Fix last test with dependency on local user_data dir

This commit is contained in:
Matthias 2023-05-11 20:30:24 +02:00
parent 1c1005247e
commit f7179f7c93

View File

@ -18,8 +18,9 @@ def entryexitanalysis_cleanup() -> None:
Backtesting.cleanup() Backtesting.cleanup()
def test_backtest_analysis_nomock(default_conf, mocker, caplog, testdatadir, tmpdir, capsys): def test_backtest_analysis_nomock(default_conf, mocker, caplog, testdatadir, user_dir, capsys):
caplog.set_level(logging.INFO) caplog.set_level(logging.INFO)
(user_dir / 'backtest_results').mkdir(parents=True, exist_ok=True)
default_conf.update({ default_conf.update({
"use_exit_signal": True, "use_exit_signal": True,
@ -80,7 +81,7 @@ def test_backtest_analysis_nomock(default_conf, mocker, caplog, testdatadir, tmp
'backtesting', 'backtesting',
'--config', 'config.json', '--config', 'config.json',
'--datadir', str(testdatadir), '--datadir', str(testdatadir),
'--user-data-dir', str(tmpdir), '--user-data-dir', str(user_dir),
'--timeframe', '5m', '--timeframe', '5m',
'--timerange', '1515560100-1517287800', '--timerange', '1515560100-1517287800',
'--export', 'signals', '--export', 'signals',
@ -98,7 +99,7 @@ def test_backtest_analysis_nomock(default_conf, mocker, caplog, testdatadir, tmp
'backtesting-analysis', 'backtesting-analysis',
'--config', 'config.json', '--config', 'config.json',
'--datadir', str(testdatadir), '--datadir', str(testdatadir),
'--user-data-dir', str(tmpdir), '--user-data-dir', str(user_dir),
] ]
# test group 0 and indicator list # test group 0 and indicator list