summaryrefslogtreecommitdiff
path: root/doc/en/example
diff options
context:
space:
mode:
authorRan Benita <ran@unusedvar.com>2020-03-27 18:40:23 +0300
committerRan Benita <ran@unusedvar.com>2020-03-27 18:40:23 +0300
commita7857545236a8c4c8eb904a43945440849cbbed4 (patch)
treed920d9d2d982fbc3b7acffe6ce67b014c02474c9 /doc/en/example
parent83e18776f6f4c084b548e580d77fdabbb1d98762 (diff)
downloadpytest-a7857545236a8c4c8eb904a43945440849cbbed4.tar.gz
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
Diffstat (limited to 'doc/en/example')
-rw-r--r--doc/en/example/assertion/failure_demo.py2
-rw-r--r--doc/en/example/reportingdemo.rst2
2 files changed, 2 insertions, 2 deletions
diff --git a/doc/en/example/assertion/failure_demo.py b/doc/en/example/assertion/failure_demo.py
index 26454e48d..4bf827904 100644
--- a/doc/en/example/assertion/failure_demo.py
+++ b/doc/en/example/assertion/failure_demo.py
@@ -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")
diff --git a/doc/en/example/reportingdemo.rst b/doc/en/example/reportingdemo.rst
index 2a1b2ed65..23c302eca 100644
--- a/doc/en/example/reportingdemo.rst
+++ b/doc/en/example/reportingdemo.rst
@@ -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