test: update tests to new behavior

pull/12479/head
Matthias 4 months ago
parent 74a18bdb11
commit ab28e43050

@ -296,14 +296,14 @@ def test_show_epoch_details(capsys):
HyperoptTools.show_epoch_details(test_result, 5, False, no_header=True) HyperoptTools.show_epoch_details(test_result, 5, False, no_header=True)
captured = capsys.readouterr() captured = capsys.readouterr()
assert "# Trailing stop:" in captured.out assert "# Trailing stop parameters:" in captured.out
# re.match(r"Pairs for .*", captured.out) # re.match(r"Pairs for .*", captured.out)
assert re.search(r"^\s+trailing_stop = True$", captured.out, re.MULTILINE) assert re.search(r"^\s+trailing_stop = True$", captured.out, re.MULTILINE)
assert re.search(r"^\s+trailing_stop_positive = 0.02$", captured.out, re.MULTILINE) assert re.search(r"^\s+trailing_stop_positive = 0.02$", captured.out, re.MULTILINE)
assert re.search(r"^\s+trailing_stop_positive_offset = 0.04$", captured.out, re.MULTILINE) assert re.search(r"^\s+trailing_stop_positive_offset = 0.04$", captured.out, re.MULTILINE)
assert re.search(r"^\s+trailing_only_offset_is_reached = True$", captured.out, re.MULTILINE) assert re.search(r"^\s+trailing_only_offset_is_reached = True$", captured.out, re.MULTILINE)
assert "# ROI table:" in captured.out assert "# ROI parameters:" in captured.out
assert re.search(r"^\s+minimal_roi = \{$", captured.out, re.MULTILINE) assert re.search(r"^\s+minimal_roi = \{$", captured.out, re.MULTILINE)
assert re.search(r"^\s+\"90\"\:\s0.14,\s*$", captured.out, re.MULTILINE) assert re.search(r"^\s+\"90\"\:\s0.14,\s*$", captured.out, re.MULTILINE)

@ -928,8 +928,7 @@ def test_auto_hyperopt_interface(default_conf):
PairLocks.timeframe = default_conf["timeframe"] PairLocks.timeframe = default_conf["timeframe"]
strategy = StrategyResolver.load_strategy(default_conf) strategy = StrategyResolver.load_strategy(default_conf)
strategy.ft_bot_start() strategy.ft_bot_start()
with pytest.raises(OperationalException): assert list(strategy.enumerate_parameters("deadBeef")) == []
next(strategy.enumerate_parameters("deadBeef"))
assert strategy.buy_rsi.value == strategy.buy_params["buy_rsi"] assert strategy.buy_rsi.value == strategy.buy_params["buy_rsi"]
# PlusDI is NOT in the buy-params, so default should be used # PlusDI is NOT in the buy-params, so default should be used

Loading…
Cancel
Save