summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
authorEric Wieser <wieser.eric@gmail.com>2020-01-15 13:25:32 +0000
committerGitHub <noreply@github.com>2020-01-15 13:25:32 +0000
commit9656e4c00d52d9583c577dbb892a090abaa3dd99 (patch)
treef5c78b0d4aafd318ca256f1b495f2db8a4eb4ec4 /numpy
parent2199ba7fb7f8bb383552fdcd6feec4faee7ae394 (diff)
parent28bf9efaea2efe70838ec866645761172901cf57 (diff)
downloadnumpy-9656e4c00d52d9583c577dbb892a090abaa3dd99.tar.gz
Merge pull request #15319 from Kai-Striega/correct_array_name
BUG: fix NameError in clip nan propagation tests
Diffstat (limited to 'numpy')
-rw-r--r--numpy/core/tests/test_numeric.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/numpy/core/tests/test_numeric.py b/numpy/core/tests/test_numeric.py
index 9e481364a..661beca4f 100644
--- a/numpy/core/tests/test_numeric.py
+++ b/numpy/core/tests/test_numeric.py
@@ -1991,7 +1991,9 @@ class TestClip:
actual = np.clip(arr, amin, amax)
assert_equal(actual, exp)
- @pytest.mark.xfail(reason="no scalar nan propagation yet")
+ @pytest.mark.xfail(reason="no scalar nan propagation yet",
+ raises=AssertionError,
+ strict=True)
@pytest.mark.parametrize("arr, amin, amax", [
# problematic scalar nan case from hypothesis
(np.zeros(10, dtype=np.int64),
@@ -2001,10 +2003,10 @@ class TestClip:
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(a, amin), amax)
+ expected = np.minimum(np.maximum(arr, amin), amax)
with assert_warns(DeprecationWarning):
actual = np.clip(arr, amin, amax)
- assert_equal(actual, expected)
+ assert_equal(actual, expected)
@pytest.mark.xfail(reason="propagation doesn't match spec")
@pytest.mark.parametrize("arr, amin, amax", [