|
|
|
|
@ -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):
|
|
|
|
|
|