From 7d27afd4b8832a70a3887727a2b007aeb41e8565 Mon Sep 17 00:00:00 2001 From: Antonio Della Fortuna Date: Sun, 8 Jan 2023 16:11:41 +0100 Subject: [PATCH] Fixed test broken due to change in trades_space range --- tests/optimize/test_hyperopt.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/optimize/test_hyperopt.py b/tests/optimize/test_hyperopt.py index d7ab20ee5..cf6faa0b9 100644 --- a/tests/optimize/test_hyperopt.py +++ b/tests/optimize/test_hyperopt.py @@ -8,6 +8,7 @@ import pandas as pd import pytest from arrow import Arrow from filelock import Timeout +from skopt.space import Integer from freqtrade.commands.optimize_commands import setup_optimize_configuration, start_hyperopt from freqtrade.data.history import load_data @@ -1041,6 +1042,8 @@ def test_max_open_trades_consistency(mocker, hyperopt_conf, tmpdir, fee) -> None assert isinstance(hyperopt.custom_hyperopt, HyperOptAuto) + hyperopt.custom_hyperopt.trades_space = lambda: [Integer(1, 10, name='max_open_trades')] + first_time_evaluated = False def stake_amount_interceptor(func):