10000 TST: mask DeprecationWarning in xfailed test by mattip · Pull Request #15610 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

TST: mask DeprecationWarning in xfailed test #15610

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 23, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions numpy/core/tests/test_numeric.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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
Expand Down
0