diff options
author | seberg <sebastian@sipsolutions.net> | 2013-02-27 08:44:48 -0800 |
---|---|---|
committer | seberg <sebastian@sipsolutions.net> | 2013-02-27 08:44:48 -0800 |
commit | a369522a3920b6ef204f9b119c957b49843c03d7 (patch) | |
tree | 6746e03989bee9411317c80aeb531b665e438898 /numpy/lib/tests | |
parent | 6de7a4be70c894e3d63ac952bd20a74c171e6413 (diff) | |
parent | 705bf928e1256a06019c75ee945370fbe89cdde7 (diff) | |
download | numpy-a369522a3920b6ef204f9b119c957b49843c03d7.tar.gz |
Merge pull request #3023 from charris/2to3-except
2to3: Use modern exception syntax.
Diffstat (limited to 'numpy/lib/tests')
-rw-r--r-- | numpy/lib/tests/test__datasource.py | 2 | ||||
-rw-r--r-- | numpy/lib/tests/test_io.py | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/numpy/lib/tests/test__datasource.py b/numpy/lib/tests/test__datasource.py index ed5af516f..3f8697507 100644 --- a/numpy/lib/tests/test__datasource.py +++ b/numpy/lib/tests/test__datasource.py @@ -92,7 +92,7 @@ class TestDataSourceOpen(TestCase): self.assertRaises(IOError, self.ds.open, url) try: self.ds.open(url) - except IOError, e: + except IOError as e: # Regression test for bug fixed in r4342. assert_(e.errno is None) diff --git a/numpy/lib/tests/test_io.py b/numpy/lib/tests/test_io.py index f8caeedb6..b7fa94448 100644 --- a/numpy/lib/tests/test_io.py +++ b/numpy/lib/tests/test_io.py @@ -151,7 +151,7 @@ class TestSavezLoad(RoundtripTest, TestCase): arr = np.random.randn(500, 500) try: np.savez(tmp, arr=arr) - except OSError, err: + except OSError as err: error_list.append(err) finally: os.remove(tmp) @@ -207,7 +207,7 @@ class TestSavezLoad(RoundtripTest, TestCase): for i in range(1, 1025): try: np.load(tmp)["data"] - except Exception, e: + except Exception as e: raise AssertionError("Failed to load data from a file: %s" % e) finally: os.remove(tmp) |