Skip to content

Commit c18a52f

Browse files
committed
test: update tests for new error formatting
1 parent 75c39d3 commit c18a52f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/strategy/test_interface.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,14 +147,14 @@ def test_get_signal_exception_valueerror(mocker, caplog, ohlcv_history):
147147
mocker.patch.object(_STRATEGY.dp, "ohlcv", return_value=ohlcv_history)
148148
mocker.patch.object(_STRATEGY, "_analyze_ticker_internal", side_effect=ValueError("xyz"))
149149
_STRATEGY.analyze_pair("foo")
150-
assert log_has_re(r"Strategy caused the following exception: xyz.*", caplog)
150+
assert log_has_re(r"Strategy caused the following exception: ValueError\('xyz'\).*", caplog)
151151
caplog.clear()
152152

153153
mocker.patch.object(
154154
_STRATEGY, "analyze_ticker", side_effect=Exception("invalid ticker history ")
155155
)
156156
_STRATEGY.analyze_pair("foo")
157-
assert log_has_re(r"Strategy caused the following exception: xyz.*", caplog)
157+
assert log_has_re(r"Strategy caused the following exception: ValueError\('xyz'\).*", caplog)
158158

159159

160160
def test_get_signal_old_dataframe(default_conf, mocker, caplog, ohlcv_history):

0 commit comments

Comments
 (0)