test: consistent use of "spaces" in tests

This commit is contained in:
Matthias
2025-10-30 06:38:43 +01:00
parent f952502af5
commit 758f1eea93

View File

@@ -686,7 +686,7 @@ def test_print_json_spaces_all(mocker, hyperopt_conf, capsys) -> None:
hyperopt_conf.update( hyperopt_conf.update(
{ {
"spaces": "all", "spaces": ["all"],
"hyperopt_jobs": 1, "hyperopt_jobs": 1,
"print_json": True, "print_json": True,
} }
@@ -802,7 +802,7 @@ def test_print_json_spaces_roi_stoploss(mocker, hyperopt_conf, capsys) -> None:
hyperopt_conf.update( hyperopt_conf.update(
{ {
"spaces": "roi stoploss", "spaces": ["roi", "stoploss"],
"hyperopt_jobs": 1, "hyperopt_jobs": 1,
"print_json": True, "print_json": True,
} }
@@ -854,7 +854,7 @@ def test_simplified_interface_roi_stoploss(mocker, hyperopt_conf, capsys) -> Non
) )
patch_exchange(mocker) patch_exchange(mocker)
hyperopt_conf.update({"spaces": "roi stoploss"}) hyperopt_conf.update({"spaces": ["roi", "stoploss"]})
hyperopt = Hyperopt(hyperopt_conf) hyperopt = Hyperopt(hyperopt_conf)
hyperopt.hyperopter.backtesting.strategy.advise_all_indicators = MagicMock() 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( hyperopt_conf.update(
{ {
"spaces": "all", "spaces": ["all"],
} }
) )
@@ -947,7 +947,7 @@ def test_simplified_interface_buy(mocker, hyperopt_conf, capsys) -> None:
) )
patch_exchange(mocker) patch_exchange(mocker)
hyperopt_conf.update({"spaces": "buy"}) hyperopt_conf.update({"spaces": ["buy"]})
hyperopt = Hyperopt(hyperopt_conf) hyperopt = Hyperopt(hyperopt_conf)
hyperopt.hyperopter.backtesting.strategy.advise_all_indicators = MagicMock() 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( hyperopt_conf.update(
{ {
"spaces": "sell", "spaces": ["sell"],
} }
) )
@@ -1054,7 +1054,7 @@ def test_simplified_interface_failed(mocker, hyperopt_conf, space) -> None:
patch_exchange(mocker) patch_exchange(mocker)
hyperopt_conf.update({"spaces": space}) hyperopt_conf.update({"spaces": [space]})
hyperopt = Hyperopt(hyperopt_conf) hyperopt = Hyperopt(hyperopt_conf)
hyperopt.hyperopter.backtesting.strategy.advise_all_indicators = MagicMock() hyperopt.hyperopter.backtesting.strategy.advise_all_indicators = MagicMock()