From d857eaf35b6a51b7208c90eb20c963ffe9c7cdf2 Mon Sep 17 00:00:00 2001 From: David Cournapeau Date: Mon, 23 Nov 2009 10:09:34 +0000 Subject: BUG: fix 2.5 >= try/except/finally. --- numpy/testing/tests/test_utils.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'numpy/testing/tests') 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 -- cgit v1.2.1