diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2013-09-01 06:56:47 -0700 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2013-09-01 06:56:47 -0700 |
commit | d958dec676beeac218a118fac084fa8b14bc9171 (patch) | |
tree | eb82afd5a4801d4c017fe0c53d5cde1b789c3f56 /numpy/lib/tests/test_function_base.py | |
parent | 74b6b2cf151c4e869c35e2d226f0d6b69ea9d330 (diff) | |
parent | 57245e4570fa84f2e40a6fa1cc22716d279f8c00 (diff) | |
download | numpy-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.py | 8 |
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) |