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:
@@ -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")
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user