From bb27b236ceb29ad0a37fefb8f1b290654c6ff5ec Mon Sep 17 00:00:00 2001 From: Matthias Date: Sat, 26 Sep 2020 14:55:12 +0200 Subject: [PATCH] Remove unused arguments --- freqtrade/optimize/backtesting.py | 4 ++-- tests/optimize/test_optimize_reports.py | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/freqtrade/optimize/backtesting.py b/freqtrade/optimize/backtesting.py index bfdb67ec2..8d4a3a205 100644 --- a/freqtrade/optimize/backtesting.py +++ b/freqtrade/optimize/backtesting.py @@ -423,8 +423,8 @@ class Backtesting: 'config': self.strategy.config, } - stats = generate_backtest_stats(data, all_results, - min_date=min_date, max_date=max_date) + stats = generate_backtest_stats(data, all_results, min_date=min_date, max_date=max_date) + if self.config.get('export', False): store_backtest_stats(self.config['exportfilename'], stats) diff --git a/tests/optimize/test_optimize_reports.py b/tests/optimize/test_optimize_reports.py index fe030e315..b484e4390 100644 --- a/tests/optimize/test_optimize_reports.py +++ b/tests/optimize/test_optimize_reports.py @@ -26,7 +26,7 @@ from freqtrade.strategy.interface import SellType from tests.data.test_history import _backup_file, _clean_test_file -def test_text_table_bt_results(default_conf, mocker): +def test_text_table_bt_results(): results = pd.DataFrame( { @@ -174,7 +174,7 @@ def test_store_backtest_stats(testdatadir, mocker): assert str(dump_mock.call_args_list[0][0][0]).startswith(str(testdatadir / 'testresult')) -def test_generate_pair_metrics(default_conf, mocker): +def test_generate_pair_metrics(): results = pd.DataFrame( { @@ -222,7 +222,7 @@ def test_generate_daily_stats(testdatadir): assert res['losing_days'] == 0 -def test_text_table_sell_reason(default_conf): +def test_text_table_sell_reason(): results = pd.DataFrame( { @@ -254,7 +254,7 @@ def test_text_table_sell_reason(default_conf): stake_currency='BTC') == result_str -def test_generate_sell_reason_stats(default_conf): +def test_generate_sell_reason_stats(): results = pd.DataFrame( { @@ -333,7 +333,7 @@ def test_text_table_strategy(default_conf): assert text_table_strategy(strategy_results, 'BTC') == result_str -def test_generate_edge_table(edge_conf, mocker): +def test_generate_edge_table(): results = {} results['ETH/BTC'] = PairInfo(-0.01, 0.60, 2, 1, 3, 10, 60)