summaryrefslogtreecommitdiff
path: root/numpy/testing
diff options
context:
space:
mode:
authorDavid Cournapeau <cournape@gmail.com>2009-11-23 10:09:34 +0000
committerDavid Cournapeau <cournape@gmail.com>2009-11-23 10:09:34 +0000
commitd857eaf35b6a51b7208c90eb20c963ffe9c7cdf2 (patch)
tree39352eb5d44dd86af9bfb0d91b60d216df1bd2d2 /numpy/testing
parent5623023a31303a2d6ec2346fb989e913b57eecc6 (diff)
downloadnumpy-d857eaf35b6a51b7208c90eb20c963ffe9c7cdf2.tar.gz
BUG: fix 2.5 >= try/except/finally.
Diffstat (limited to 'numpy/testing')
-rw-r--r--numpy/testing/tests/test_utils.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/numpy/testing/tests/test_utils.py b/numpy/testing/tests/test_utils.py
index 2d22789ff..1d8fe2870 100644
--- a/numpy/testing/tests/test_utils.py
+++ b/numpy/testing/tests/test_utils.py
@@ -324,11 +324,12 @@ class TestWarns(unittest.TestCase):
failed = False
filters = sys.modules['warnings'].filters[:]
try:
- # Should raise an AssertionError
- assert_warns(UserWarning, f)
- failed = True
- except AssertionError:
- pass
+ try:
+ # Should raise an AssertionError
+ assert_warns(UserWarning, f)
+ failed = True
+ except AssertionError:
+ pass
finally:
sys.modules['warnings'].filters = filters