From: Debian Science Team Date: Tue, 31 Jan 2023 13:21:16 +0000 (+0000) Subject: Ignore extra warning from numpy 1.24 X-Git-Tag: archive/raspbian/1.5.3+dfsg-2+rpi1~2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=e24b767336476a8b849bd34d59b7a1d423361268;p=pandas.git Ignore extra warning from numpy 1.24 Author: Rebecca N. Palmer Forwarded: not-needed (on main, this is .raises due to other changes) Gbp-Pq: Name numpy1p24.patch --- diff --git a/pandas/tests/test_downstream.py b/pandas/tests/test_downstream.py index 067eb85d..a08360ba 100644 --- a/pandas/tests/test_downstream.py +++ b/pandas/tests/test_downstream.py @@ -105,11 +105,11 @@ def test_construct_dask_float_array_int_dtype_match_ndarray(): expected = Series(arr, dtype="i8") tm.assert_series_equal(res, expected) - msg = "In a future version, passing float-dtype values containing NaN" + msg = "In a future version, passing float-dtype values containing NaN|invalid value encountered in cast" arr[2] = np.nan - with tm.assert_produces_warning(FutureWarning, match=msg): + with tm.assert_produces_warning((FutureWarning,RuntimeWarning), match=msg, check_stacklevel=False): res = Series(darr, dtype="i8") - with tm.assert_produces_warning(FutureWarning, match=msg): + with tm.assert_produces_warning((FutureWarning,RuntimeWarning), match=msg, check_stacklevel=False): expected = Series(arr, dtype="i8") tm.assert_series_equal(res, expected)