summaryrefslogtreecommitdiff
path: root/numpy/core/tests
diff options
context:
space:
mode:
authormattip <matti.picus@gmail.com>2020-02-19 22:58:17 +0200
committermattip <matti.picus@gmail.com>2020-02-23 20:08:59 +0200
commit10bba3c9e91620d1a3776767c61a4cdbfc9e0351 (patch)
treeb24f8810d54b276a86eef346058e94a7e7f73b95 /numpy/core/tests
parent670ac4fc50e82f6f162b2dd776de2ef28fac2a4f (diff)
downloadnumpy-10bba3c9e91620d1a3776767c61a4cdbfc9e0351.tar.gz
TST: mask DeprecationWarning in xfailed tests
Diffstat (limited to 'numpy/core/tests')
-rw-r--r--numpy/core/tests/test_numeric.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/numpy/core/tests/test_numeric.py b/numpy/core/tests/test_numeric.py
index 135acc51d..05f59d9dc 100644
--- a/numpy/core/tests/test_numeric.py
+++ b/numpy/core/tests/test_numeric.py
@@ -2000,12 +2000,12 @@ class TestClip:
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 @@ class TestClip:
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