Introduce --exit-signals flag to backtesting-analysis command

This commit is contained in:
jainanuj94
2024-08-02 20:09:56 +05:30
parent 8f8859a5f5
commit b0e863dbbb
5 changed files with 14 additions and 25 deletions

View File

@@ -295,7 +295,7 @@ def test_store_backtest_candles(testdatadir, mocker):
# mock directory exporting
store_backtest_analysis_results(testdatadir, candle_dict, {}, {}, "2022_01_01_15_05_13")
assert dump_mock.call_count == 2
assert dump_mock.call_count == 3
assert isinstance(dump_mock.call_args_list[0][0][0], Path)
assert str(dump_mock.call_args_list[0][0][0]).endswith("_signals.pkl")
@@ -303,7 +303,7 @@ def test_store_backtest_candles(testdatadir, mocker):
# mock file exporting
filename = Path(testdatadir / "testresult")
store_backtest_analysis_results(filename, candle_dict, {}, {}, "2022_01_01_15_05_13")
assert dump_mock.call_count == 2
assert dump_mock.call_count == 3
assert isinstance(dump_mock.call_args_list[0][0][0], Path)
# result will be testdatadir / testresult-<timestamp>_signals.pkl
assert str(dump_mock.call_args_list[0][0][0]).endswith("_signals.pkl")