Parametrize account names for offline ledger tests

account_tests
Tyler Goodlet 2023-08-03 17:28:08 -04:00
parent e4ea7d6193
commit 5d86d336f2
1 changed files with 13 additions and 3 deletions

View File

@ -7,6 +7,7 @@
''' '''
from pathlib import Path from pathlib import Path
import pytest
from piker import config from piker import config
from piker.accounting import ( from piker.accounting import (
Account, Account,
@ -44,9 +45,18 @@ def test_account_file_default_empty(
assert path.parent.name == 'accounting' assert path.parent.name == 'accounting'
def test_paper_ledger_position_calcs(): @pytest.mark.parametrize(
broker: str = 'binance' 'fq_acnt',
acnt_name: str = 'paper' [
('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' accounts_path: Path = config.repodir() / 'tests' / '_inputs'