mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
Issue #16706: get rid of os.error
This commit is contained in:
parent
a191959849
commit
ad28c7f9da
33 changed files with 4089 additions and 4123 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue