diff options
author | Sebastian Berg <sebastian@sipsolutions.net> | 2020-03-23 12:06:08 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-23 12:06:08 -0500 |
commit | b3f41eeafd2708a6b519cf3c7ba3576dfa1cc5b3 (patch) | |
tree | 930332b6ff5ea182ea055f51e1b278c006671606 /numpy/lib/tests/test_function_base.py | |
parent | d5010b129e4f3714dcad04eb7115372848fbce36 (diff) | |
parent | 86dd5ce7ffd4370add745a4b57c1ed67c3d9261f (diff) | |
download | numpy-b3f41eeafd2708a6b519cf3c7ba3576dfa1cc5b3.tar.gz |
Merge pull request #15812 from eric-wieser/expire-delete-out-of-bounds
TST: Remove code that is not supposed to warn out of warning assertion
Diffstat (limited to 'numpy/lib/tests/test_function_base.py')
-rw-r--r-- | numpy/lib/tests/test_function_base.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/numpy/lib/tests/test_function_base.py b/numpy/lib/tests/test_function_base.py index 05e5bff50..04b280038 100644 --- a/numpy/lib/tests/test_function_base.py +++ b/numpy/lib/tests/test_function_base.py @@ -834,11 +834,15 @@ class TestDelete: delete(self.a, [100]) with pytest.raises(IndexError): delete(self.a, [-100]) + + self._check_inverse_of_slicing([0, -1, 2, 2]) + with warnings.catch_warnings(record=True) as w: warnings.filterwarnings('always', category=FutureWarning) - self._check_inverse_of_slicing([0, -1, 2, 2]) obj = np.array([True, False, False], dtype=bool) self._check_inverse_of_slicing(obj) + # _check_inverse_of_slicing operates on two arrays, so warns twice + assert len(w) == 2 assert_(w[0].category is FutureWarning) assert_(w[1].category is FutureWarning) |