Change EnvironmentError, IOError to OSError - they are aliases

Since Python 3.3, these are aliases for OSError:
https://docs.python.org/3/whatsnew/3.3.html#pep-3151-reworking-the-os-and-io-exception-hierarchy
This commit is contained in:
Ran Benita
2020-03-27 18:40:23 +03:00
parent 83e18776f6
commit a785754523
15 changed files with 35 additions and 35 deletions
+1 -1
View File
@@ -167,7 +167,7 @@ class TestRaises:
raises(TypeError, int, s)
def test_raises_doesnt(self):
raises(IOError, int, "3")
raises(OSError, int, "3")
def test_raise(self):
raise ValueError("demo error")
+1 -1
View File
@@ -406,7 +406,7 @@ Here is a nice run of several failures and how ``pytest`` presents things:
self = <failure_demo.TestRaises object at 0xdeadbeef>
def test_raises_doesnt(self):
> raises(IOError, int, "3")
> raises(OSError, int, "3")
E Failed: DID NOT RAISE <class 'OSError'>
failure_demo.py:170: Failed