From 758f1eea9315f2fcc5b297fef5c4982c3e7ebcf3 Mon Sep 17 00:00:00 2001 From: Matthias Date: Thu, 30 Oct 2025 06:38:43 +0100 Subject: [PATCH] test: consistent use of "spaces" in tests --- tests/optimize/test_hyperopt.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/optimize/test_hyperopt.py b/tests/optimize/test_hyperopt.py index e4ce3d981..bca0abacf 100644 --- a/tests/optimize/test_hyperopt.py +++ b/tests/optimize/test_hyperopt.py @@ -686,7 +686,7 @@ def test_print_json_spaces_all(mocker, hyperopt_conf, capsys) -> None: hyperopt_conf.update( { - "spaces": "all", + "spaces": ["all"], "hyperopt_jobs": 1, "print_json": True, } @@ -802,7 +802,7 @@ def test_print_json_spaces_roi_stoploss(mocker, hyperopt_conf, capsys) -> None: hyperopt_conf.update( { - "spaces": "roi stoploss", + "spaces": ["roi", "stoploss"], "hyperopt_jobs": 1, "print_json": True, } @@ -854,7 +854,7 @@ def test_simplified_interface_roi_stoploss(mocker, hyperopt_conf, capsys) -> Non ) patch_exchange(mocker) - hyperopt_conf.update({"spaces": "roi stoploss"}) + hyperopt_conf.update({"spaces": ["roi", "stoploss"]}) hyperopt = Hyperopt(hyperopt_conf) hyperopt.hyperopter.backtesting.strategy.advise_all_indicators = MagicMock() @@ -893,7 +893,7 @@ def test_simplified_interface_all_failed(mocker, hyperopt_conf, caplog) -> None: hyperopt_conf.update( { - "spaces": "all", + "spaces": ["all"], } ) @@ -947,7 +947,7 @@ def test_simplified_interface_buy(mocker, hyperopt_conf, capsys) -> None: ) patch_exchange(mocker) - hyperopt_conf.update({"spaces": "buy"}) + hyperopt_conf.update({"spaces": ["buy"]}) hyperopt = Hyperopt(hyperopt_conf) hyperopt.hyperopter.backtesting.strategy.advise_all_indicators = MagicMock() @@ -1003,7 +1003,7 @@ def test_simplified_interface_sell(mocker, hyperopt_conf, capsys) -> None: hyperopt_conf.update( { - "spaces": "sell", + "spaces": ["sell"], } ) @@ -1054,7 +1054,7 @@ def test_simplified_interface_failed(mocker, hyperopt_conf, space) -> None: patch_exchange(mocker) - hyperopt_conf.update({"spaces": space}) + hyperopt_conf.update({"spaces": [space]}) hyperopt = Hyperopt(hyperopt_conf) hyperopt.hyperopter.backtesting.strategy.advise_all_indicators = MagicMock()