|
|
|
|
@ -186,18 +186,22 @@ def test_plot_dataframe_options() -> None:
|
|
|
|
|
assert pargs['pairs'] == ['UNITTEST/BTC']
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def test_plot_profit_options() -> None:
|
|
|
|
|
@pytest.mark.parametrize('auto_open_arg', [True, False])
|
|
|
|
|
def test_plot_profit_options(auto_open_arg: bool) -> None:
|
|
|
|
|
args = [
|
|
|
|
|
'plot-profit',
|
|
|
|
|
'-p', 'UNITTEST/BTC',
|
|
|
|
|
'--trade-source', 'DB',
|
|
|
|
|
'--db-url', 'sqlite:///whatever.sqlite',
|
|
|
|
|
]
|
|
|
|
|
if auto_open_arg:
|
|
|
|
|
args.append('--auto-open')
|
|
|
|
|
pargs = Arguments(args).get_parsed_arg()
|
|
|
|
|
|
|
|
|
|
assert pargs['trade_source'] == 'DB'
|
|
|
|
|
assert pargs['pairs'] == ['UNITTEST/BTC']
|
|
|
|
|
assert pargs['db_url'] == 'sqlite:///whatever.sqlite'
|
|
|
|
|
assert pargs['plot_auto_open'] == auto_open_arg
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def test_config_notallowed(mocker) -> None:
|
|
|
|
|
|