From 5d86d336f2073ac07f64ad9b7c1a7eea0fac4442 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Thu, 3 Aug 2023 17:28:08 -0400 Subject: [PATCH] Parametrize account names for offline ledger tests --- tests/test_accounting.py | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/tests/test_accounting.py b/tests/test_accounting.py index e7773a7a..952a9229 100644 --- a/tests/test_accounting.py +++ b/tests/test_accounting.py @@ -7,6 +7,7 @@ ''' from pathlib import Path +import pytest from piker import config from piker.accounting import ( Account, @@ -44,9 +45,18 @@ def test_account_file_default_empty( assert path.parent.name == 'accounting' -def test_paper_ledger_position_calcs(): - broker: str = 'binance' - acnt_name: str = 'paper' +@pytest.mark.parametrize( + 'fq_acnt', + [ + ('binance', 'paper'), + ], +) +def test_paper_ledger_position_calcs( + fq_acnt: tuple[str, str], +): + broker: str + acnt_name: str + broker, acnt_name = fq_acnt accounts_path: Path = config.repodir() / 'tests' / '_inputs'