diff options
Diffstat (limited to 'Lib/test/test_tempfile.py')
-rw-r--r-- | Lib/test/test_tempfile.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_tempfile.py b/Lib/test/test_tempfile.py index f5193dc..2b8f096 100644 --- a/Lib/test/test_tempfile.py +++ b/Lib/test/test_tempfile.py @@ -188,7 +188,7 @@ class TestCandidateTempdirList(BaseTestCase): try: dirname = os.getcwd() - except (AttributeError, os.error): + except (AttributeError, OSError): dirname = os.curdir self.assertIn(dirname, cand) @@ -924,7 +924,7 @@ class TestTemporaryDirectory(BaseTestCase): # (noted as part of Issue #10188) with tempfile.TemporaryDirectory() as nonexistent: pass - with self.assertRaises(os.error): + with self.assertRaises(OSError): tempfile.TemporaryDirectory(dir=nonexistent) def test_explicit_cleanup(self): |