diff options
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 b29e75471..af0b5d91a 100644 --- a/numpy/lib/tests/test_function_base.py +++ b/numpy/lib/tests/test_function_base.py @@ -828,11 +828,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) |