summaryrefslogtreecommitdiff
path: root/numpy/lib/tests/test_function_base.py
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2013-09-01 06:56:47 -0700
committerCharles Harris <charlesr.harris@gmail.com>2013-09-01 06:56:47 -0700
commitd958dec676beeac218a118fac084fa8b14bc9171 (patch)
treeeb82afd5a4801d4c017fe0c53d5cde1b789c3f56 /numpy/lib/tests/test_function_base.py
parent74b6b2cf151c4e869c35e2d226f0d6b69ea9d330 (diff)
parent57245e4570fa84f2e40a6fa1cc22716d279f8c00 (diff)
downloadnumpy-d958dec676beeac218a118fac084fa8b14bc9171.tar.gz
Merge pull request #3668 from charris/fix-buggy-tests
Fix buggy tests
Diffstat (limited to 'numpy/lib/tests/test_function_base.py')
-rw-r--r--numpy/lib/tests/test_function_base.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/numpy/lib/tests/test_function_base.py b/numpy/lib/tests/test_function_base.py
index 28f094653..360b6ab66 100644
--- a/numpy/lib/tests/test_function_base.py
+++ b/numpy/lib/tests/test_function_base.py
@@ -395,10 +395,12 @@ class TestDelete(TestCase):
def test_fancy(self):
# Deprecation/FutureWarning tests should be kept after change.
self._check_inverse_of_slicing(np.array([[0, 1], [2, 1]]))
- assert_raises(DeprecationWarning, delete, self.a, [100])
- assert_raises(DeprecationWarning, delete, self.a, [-100])
+ with warnings.catch_warnings():
+ warnings.filterwarnings('error', category=DeprecationWarning)
+ assert_raises(DeprecationWarning, delete, self.a, [100])
+ assert_raises(DeprecationWarning, delete, self.a, [-100])
with warnings.catch_warnings(record=True) as w:
- warnings.filterwarnings('always', '', FutureWarning)
+ 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)