summaryrefslogtreecommitdiff
path: root/numpy/lib/tests
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2021-09-02 10:28:28 -0600
committerGitHub <noreply@github.com>2021-09-02 10:28:28 -0600
commit95d254027f2fb526fe4c745f330e6fa448a7e4db (patch)
treedceb9f90936601187aa6450139cdf26912b4db3b /numpy/lib/tests
parent47368730049ac394c50d2b73fa51e671c1320984 (diff)
parent7ad8ea7b11e3544b133d8b397dd3bbe4833d3308 (diff)
downloadnumpy-95d254027f2fb526fe4c745f330e6fa448a7e4db.tar.gz
Merge pull request #19815 from mwtoews/maint-ioerror
MAINT: revise OSError aliases (IOError, EnvironmentError)
Diffstat (limited to 'numpy/lib/tests')
-rw-r--r--numpy/lib/tests/test__datasource.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/numpy/lib/tests/test__datasource.py b/numpy/lib/tests/test__datasource.py
index 1ed7815d9..2738d41c4 100644
--- a/numpy/lib/tests/test__datasource.py
+++ b/numpy/lib/tests/test__datasource.py
@@ -102,10 +102,10 @@ class TestDataSourceOpen:
def test_InvalidHTTP(self):
url = invalid_httpurl()
- assert_raises(IOError, self.ds.open, url)
+ assert_raises(OSError, self.ds.open, url)
try:
self.ds.open(url)
- except IOError as e:
+ except OSError as e:
# Regression test for bug fixed in r4342.
assert_(e.errno is None)
@@ -120,7 +120,7 @@ class TestDataSourceOpen:
def test_InvalidFile(self):
invalid_file = invalid_textfile(self.tmpdir)
- assert_raises(IOError, self.ds.open, invalid_file)
+ assert_raises(OSError, self.ds.open, invalid_file)
def test_ValidGzipFile(self):
try: