Ignore extra warning from numpy 1.24
authorDebian Science Team <debian-science-maintainers@lists.alioth.debian.org>
Sun, 22 Jan 2023 11:54:30 +0000 (11:54 +0000)
committerRebecca N. Palmer <rebecca_palmer@zoho.com>
Sun, 22 Jan 2023 11:54:30 +0000 (11:54 +0000)
Author: Rebecca N. Palmer <rebecca_palmer@zoho.com>
Forwarded: not-needed (on main, this is .raises due to other changes)

Gbp-Pq: Name numpy1p24.patch

pandas/tests/test_downstream.py

index 067eb85d8efe7075bb1d45a86404e2a864bd4d57..a08360baf960dc78c8fd4f96ece47e3870f0b9c4 100644 (file)
@@ -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)