mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-12-03 02:23:05 +00:00
test: update tests for new error formatting
This commit is contained in:
@@ -147,14 +147,14 @@ def test_get_signal_exception_valueerror(mocker, caplog, ohlcv_history):
|
||||
mocker.patch.object(_STRATEGY.dp, "ohlcv", return_value=ohlcv_history)
|
||||
mocker.patch.object(_STRATEGY, "_analyze_ticker_internal", side_effect=ValueError("xyz"))
|
||||
_STRATEGY.analyze_pair("foo")
|
||||
assert log_has_re(r"Strategy caused the following exception: xyz.*", caplog)
|
||||
assert log_has_re(r"Strategy caused the following exception: ValueError\('xyz'\).*", caplog)
|
||||
caplog.clear()
|
||||
|
||||
mocker.patch.object(
|
||||
_STRATEGY, "analyze_ticker", side_effect=Exception("invalid ticker history ")
|
||||
)
|
||||
_STRATEGY.analyze_pair("foo")
|
||||
assert log_has_re(r"Strategy caused the following exception: xyz.*", caplog)
|
||||
assert log_has_re(r"Strategy caused the following exception: ValueError\('xyz'\).*", caplog)
|
||||
|
||||
|
||||
def test_get_signal_old_dataframe(default_conf, mocker, caplog, ohlcv_history):
|
||||
|
||||
Reference in New Issue
Block a user