diff --git a/tests/series/test_agg.py b/tests/series/test_agg.py index bd1d2ec21..2ed73502d 100644 --- a/tests/series/test_agg.py +++ b/tests/series/test_agg.py @@ -52,7 +52,9 @@ def test_agg_complex() -> None: np.exceptions.ComplexWarning, r"Casting complex values to real discards the imaginary part", ), - pytest_warns_bounded(RuntimeWarning, r"invalid value encountered in sqrt"), + pytest_warns_bounded( + RuntimeWarning, r"invalid value encountered in sqrt", upper="2.3.99" + ), ): check(assert_type(series.std(), np.float64), np.float64)