test: explicitly convert warnings to string

This commit is contained in:
Matthias
2026-03-10 19:01:39 +01:00
parent 0bd5086a0f
commit 881edddb6e
+2 -2
View File
@@ -1047,7 +1047,7 @@ def test_pandas_warning_direct(ohlcv_history, function, raises, recwarn):
# Fixed in 2.2.x
getattr(_STRATEGY, function)(df, {"pair": "ETH/BTC"})
else:
assert len(recwarn) == 0, f"warnings: {', '.join(recwarn.list)}"
assert len(recwarn) == 0, f"warnings: {', '.join(str(w) for w in recwarn.list)}"
getattr(_STRATEGY, function)(df, {"pair": "ETH/BTC"})
@@ -1055,4 +1055,4 @@ def test_pandas_warning_direct(ohlcv_history, function, raises, recwarn):
def test_pandas_warning_through_analyze_pair(ohlcv_history, mocker, recwarn):
mocker.patch.object(_STRATEGY.dp, "ohlcv", return_value=ohlcv_history)
_STRATEGY.analyze_pair("ETH/BTC")
assert len(recwarn) == 0, f"warnings: {', '.join(recwarn.list)}"
assert len(recwarn) == 0, f"warnings: {', '.join(str(w) for w in recwarn.list)}"