From 881edddb6e28e490686b9135741dabee844dc3b6 Mon Sep 17 00:00:00 2001 From: Matthias Date: Tue, 10 Mar 2026 19:01:39 +0100 Subject: [PATCH] test: explicitly convert warnings to string --- tests/strategy/test_interface.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/strategy/test_interface.py b/tests/strategy/test_interface.py index 449440ec8..f64c2c3cb 100644 --- a/tests/strategy/test_interface.py +++ b/tests/strategy/test_interface.py @@ -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)}"