test: add failing test for #11752
This commit is contained in:
@@ -385,6 +385,17 @@ def test_strategy_max_open_trades_infinity_from_strategy(caplog, default_conf):
|
|||||||
assert strategy.max_open_trades == float("inf")
|
assert strategy.max_open_trades == float("inf")
|
||||||
assert default_conf["max_open_trades"] == float("inf")
|
assert default_conf["max_open_trades"] == float("inf")
|
||||||
|
|
||||||
|
# test if the default value is set to infinity (V2 doesn't set max_open_trades explicitly)
|
||||||
|
del default_conf["max_open_trades"]
|
||||||
|
default_conf.update(
|
||||||
|
{
|
||||||
|
"strategy": "StrategyTestV2",
|
||||||
|
}
|
||||||
|
)
|
||||||
|
strategy2 = StrategyResolver.load_strategy(default_conf)
|
||||||
|
assert strategy2.max_open_trades == float("inf")
|
||||||
|
assert default_conf["max_open_trades"] == float("inf")
|
||||||
|
|
||||||
|
|
||||||
def test_strategy_max_open_trades_infinity_from_config(caplog, default_conf, mocker):
|
def test_strategy_max_open_trades_infinity_from_config(caplog, default_conf, mocker):
|
||||||
caplog.set_level(logging.INFO)
|
caplog.set_level(logging.INFO)
|
||||||
|
|||||||
Reference in New Issue
Block a user