From d24bef788317e5582e8fd96b543182f1c7192529 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sat, 2 Nov 2024 16:54:54 +0100 Subject: [PATCH] tests: remove --dmmp from tests --- tests/optimize/test_backtesting.py | 14 -------------- tests/optimize/test_hyperopt.py | 5 ----- tests/test_configuration.py | 7 ------- 3 files changed, 26 deletions(-) diff --git a/tests/optimize/test_backtesting.py b/tests/optimize/test_backtesting.py index e9c5d9132..7c14956e7 100644 --- a/tests/optimize/test_backtesting.py +++ b/tests/optimize/test_backtesting.py @@ -189,7 +189,6 @@ def test_setup_bt_configuration_with_arguments(mocker, default_conf, caplog) -> "--timeframe", "1m", "--enable-position-stacking", - "--disable-max-market-positions", "--timerange", ":100", "--export-filename", @@ -214,10 +213,6 @@ def test_setup_bt_configuration_with_arguments(mocker, default_conf, caplog) -> assert "position_stacking" in config assert log_has("Parameter --enable-position-stacking detected ...", caplog) - assert "use_max_market_positions" in config - assert log_has("Parameter --disable-max-market-positions detected ...", caplog) - assert log_has("max_open_trades set to unlimited ...", caplog) - assert "timerange" in config assert log_has("Parameter --timerange detected: {} ...".format(config["timerange"]), caplog) @@ -1936,14 +1931,12 @@ def test_backtest_start_timerange(default_conf, mocker, caplog, testdatadir): "--timerange", "1510694220-1510700340", "--enable-position-stacking", - "--disable-max-market-positions", ] args = get_args(args) start_backtesting(args) # check the logs, that will contain the backtest result exists = [ "Parameter -i/--timeframe detected ... Using timeframe: 1m ...", - "Ignoring max_open_trades (--disable-max-market-positions was used) ...", "Parameter --timerange detected: 1510694220-1510700340 ...", f"Using data directory: {testdatadir} ...", "Loading data from 2017-11-14 20:57:00 up to 2017-11-14 22:59:00 (0 days).", @@ -2017,7 +2010,6 @@ def test_backtest_start_multi_strat(default_conf, mocker, caplog, testdatadir): "--timerange", "1510694220-1510700340", "--enable-position-stacking", - "--disable-max-market-positions", "--strategy-list", CURRENT_TEST_STRATEGY, "StrategyTestV2", @@ -2034,7 +2026,6 @@ def test_backtest_start_multi_strat(default_conf, mocker, caplog, testdatadir): # check the logs, that will contain the backtest result exists = [ "Parameter -i/--timeframe detected ... Using timeframe: 1m ...", - "Ignoring max_open_trades (--disable-max-market-positions was used) ...", "Parameter --timerange detected: 1510694220-1510700340 ...", f"Using data directory: {testdatadir} ...", "Loading data from 2017-11-14 20:57:00 up to 2017-11-14 22:59:00 (0 days).", @@ -2155,7 +2146,6 @@ def test_backtest_start_multi_strat_nomock(default_conf, mocker, caplog, testdat "--timerange", "1510694220-1510700340", "--enable-position-stacking", - "--disable-max-market-positions", "--breakdown", "day", "--strategy-list", @@ -2168,7 +2158,6 @@ def test_backtest_start_multi_strat_nomock(default_conf, mocker, caplog, testdat # check the logs, that will contain the backtest result exists = [ "Parameter -i/--timeframe detected ... Using timeframe: 1m ...", - "Ignoring max_open_trades (--disable-max-market-positions was used) ...", "Parameter --timerange detected: 1510694220-1510700340 ...", f"Using data directory: {testdatadir} ...", "Loading data from 2017-11-14 20:57:00 up to 2017-11-14 22:59:00 (0 days).", @@ -2593,7 +2582,6 @@ def test_backtest_start_multi_strat_caching( "--timerange", "1510694220-1510700340", "--enable-position-stacking", - "--disable-max-market-positions", "--cache", cache, "--strategy-list", @@ -2620,7 +2608,6 @@ def test_backtest_start_multi_strat_caching( exists = [ "Running backtesting for Strategy StrategyTestV2", "Running backtesting for Strategy StrategyTestV3", - "Ignoring max_open_trades (--disable-max-market-positions was used) ...", "Backtesting with data from 2017-11-14 21:17:00 up to 2017-11-14 22:59:00 (0 days).", ] elif run_id == "2" and min_backtest_date < start_time: @@ -2633,7 +2620,6 @@ def test_backtest_start_multi_strat_caching( exists = [ "Reusing result of previous backtest for StrategyTestV2", "Running backtesting for Strategy StrategyTestV3", - "Ignoring max_open_trades (--disable-max-market-positions was used) ...", "Backtesting with data from 2017-11-14 21:17:00 up to 2017-11-14 22:59:00 (0 days).", ] assert backtestmock.call_count == 1 diff --git a/tests/optimize/test_hyperopt.py b/tests/optimize/test_hyperopt.py index a9f697629..e7b03da6f 100644 --- a/tests/optimize/test_hyperopt.py +++ b/tests/optimize/test_hyperopt.py @@ -102,7 +102,6 @@ def test_setup_hyperopt_configuration_with_arguments(mocker, default_conf, caplo "--timerange", ":100", "--enable-position-stacking", - "--disable-max-market-positions", "--epochs", "1000", "--spaces", @@ -126,10 +125,6 @@ def test_setup_hyperopt_configuration_with_arguments(mocker, default_conf, caplo assert "position_stacking" in config assert log_has("Parameter --enable-position-stacking detected ...", caplog) - assert "use_max_market_positions" in config - assert log_has("Parameter --disable-max-market-positions detected ...", caplog) - assert log_has("max_open_trades set to unlimited ...", caplog) - assert "timerange" in config assert log_has("Parameter --timerange detected: {} ...".format(config["timerange"]), caplog) diff --git a/tests/test_configuration.py b/tests/test_configuration.py index 829bf699a..8011ded96 100644 --- a/tests/test_configuration.py +++ b/tests/test_configuration.py @@ -489,7 +489,6 @@ def test_setup_configuration_with_arguments(mocker, default_conf, caplog, tmp_pa "--timeframe", "1m", "--enable-position-stacking", - "--disable-max-market-positions", "--timerange", ":100", "--export", @@ -518,10 +517,6 @@ def test_setup_configuration_with_arguments(mocker, default_conf, caplog, tmp_pa assert "position_stacking" in config assert log_has("Parameter --enable-position-stacking detected ...", caplog) - assert "use_max_market_positions" in config - assert log_has("Parameter --disable-max-market-positions detected ...", caplog) - assert log_has("max_open_trades set to unlimited ...", caplog) - assert "timerange" in config assert log_has("Parameter --timerange detected: {} ...".format(config["timerange"]), caplog) @@ -570,8 +565,6 @@ def test_setup_configuration_with_stratlist(mocker, default_conf, caplog) -> Non assert "position_stacking" not in config - assert "use_max_market_positions" not in config - assert "timerange" not in config assert "export" in config