Skip to content

Commit 3b6dbac

Browse files
committed
test: add failing test for freqtrade#11752
1 parent 3fe9e6b commit 3b6dbac

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/strategy/test_strategy_loading.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,17 @@ def test_strategy_max_open_trades_infinity_from_strategy(caplog, default_conf):
385385
assert strategy.max_open_trades == float("inf")
386386
assert default_conf["max_open_trades"] == float("inf")
387387

388+
# test if the default value is set to infinity (V2 doesn't set max_open_trades explicitly)
389+
del default_conf["max_open_trades"]
390+
default_conf.update(
391+
{
392+
"strategy": "StrategyTestV2",
393+
}
394+
)
395+
strategy2 = StrategyResolver.load_strategy(default_conf)
396+
assert strategy2.max_open_trades == float("inf")
397+
assert default_conf["max_open_trades"] == float("inf")
398+
388399

389400
def test_strategy_max_open_trades_infinity_from_config(caplog, default_conf, mocker):
390401
caplog.set_level(logging.INFO)

0 commit comments

Comments
 (0)