From 10bba3c9e91620d1a3776767c61a4cdbfc9e0351 Mon Sep 17 00:00:00 2001 From: mattip Date: Wed, 19 Feb 2020 22:58:17 +0200 Subject: [PATCH] TST: mask DeprecationWarning in xfailed tests --- numpy/core/tests/test_numeric.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/numpy/core/tests/test_numeric.py b/numpy/core/tests/test_numeric.py index 135acc51dfb3..05f59d9dc7d1 100644 --- a/numpy/core/tests/test_numeric.py +++ b/numpy/core/tests/test_numeric.py @@ -2000,12 +2000,12 @@ def test_clip_problem_cases(self, arr, amin, amax, exp): np.array(np.nan), np.zeros(10, dtype=np.int32)), ]) + @pytest.mark.filterwarnings("ignore::DeprecationWarning") def test_clip_scalar_nan_propagation(self, arr, amin, amax): # enforcement of scalar nan propagation for comparisons # called through clip() expected = np.minimum(np.maximum(arr, amin), amax) - with assert_warns(DeprecationWarning): - actual = np.clip(arr, amin, amax) + actual = np.clip(arr, amin, amax) assert_equal(actual, expected) @pytest.mark.xfail(reason="propagation doesn't match spec") @@ -2014,6 +2014,7 @@ def test_clip_scalar_nan_propagation(self, arr, amin, amax): np.timedelta64('NaT'), np.zeros(10, dtype=np.int32)), ]) + @pytest.mark.filterwarnings("ignore::DeprecationWarning") def test_NaT_propagation(self, arr, amin, amax): # NOTE: the expected function spec doesn't # propagate NaT, but clip() now does