Skip to content

Commit b71f91a

Browse files
committed
test: attempted reduction of test flukes by resetting recwarn
1 parent 812dc64 commit b71f91a

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

tests/strategy/test_interface.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1041,6 +1041,7 @@ def test_auto_hyperopt_interface_loadparams(default_conf, mocker, caplog):
10411041
],
10421042
)
10431043
def test_pandas_warning_direct(ohlcv_history, function, raises, recwarn):
1044+
recwarn.clear()
10441045
df = _STRATEGY.populate_indicators(ohlcv_history, {"pair": "ETH/BTC"})
10451046
if raises:
10461047
assert len(recwarn) == 1
@@ -1054,6 +1055,7 @@ def test_pandas_warning_direct(ohlcv_history, function, raises, recwarn):
10541055

10551056

10561057
def test_pandas_warning_through_analyze_pair(ohlcv_history, mocker, recwarn):
1058+
recwarn.clear()
10571059
mocker.patch.object(_STRATEGY.dp, "ohlcv", return_value=ohlcv_history)
10581060
_STRATEGY.analyze_pair("ETH/BTC")
10591061
assert len(recwarn) == 0, f"warnings: {', '.join(str(w) for w in recwarn.list)}"

0 commit comments

Comments
 (0)