8000 TST: mask DeprecationWarning in xfailed tests · numpy/numpy@10bba3c · GitHub
[go: up one dir, main page]

Skip to content

Commit 10bba3c

Browse files
committed
TST: mask DeprecationWarning in xfailed tests
1 parent 670ac4f commit 10bba3c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

numpy/core/tests/test_numeric.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2000,12 +2000,12 @@ def test_clip_problem_cases(self, arr, amin, amax, exp):
20002000
np.array(np.nan),
20012001
np.zeros(10, dtype=np.int32)),
20022002
])
2003+
@pytest.mark.filterwarnings("ignore::DeprecationWarning")
20032004
def test_clip_scalar_nan_propagation(self, arr, amin, amax):
20042005
# enforcement of scalar nan propagation for comparisons
20052006
# called through clip()
20062007
expected = np.minimum(np.maximum(arr, amin), amax)
2007-
with assert_warns(DeprecationWarning):
2008-
actual = np.clip(arr, amin, amax)
2008+
actual = np.clip(arr, amin, amax)
20092009
assert_equal(actual, expected)
20102010

20112011
@pytest.mark.xfail(reason="propagation doesn't match spec")
@@ -2014,6 +2014,7 @@ def test_clip_scalar_nan_propagation(self, arr, amin, amax):
20142014
np.timedelta64('NaT'),
20152015
np.zeros(10, dtype=np.int32)),
20162016
])
2017+
@pytest.mark.filterwarnings("ignore::DeprecationWarning")
20172018
def test_NaT_propagation(self, arr, amin, amax):
20182019
# NOTE: the expected function spec doesn't
20192020
# propagate NaT, but clip() now does

0 commit comments

Comments
 (0)
0