mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Issue #15478: Fix test_os on FreeBSD
Calling OS functions can fail with errors other than FileNotFoundError: a FreeBSD buildbot fails for example with a PermissionError.
This commit is contained in:
parent
f69055efba
commit
bd54f0eb3a
1 changed files with 1 additions and 1 deletions
|
@ -2112,7 +2112,7 @@ class OSErrorTests(unittest.TestCase):
|
|||
for name in self.filenames:
|
||||
try:
|
||||
func(name, *func_args)
|
||||
except FileNotFoundError as err:
|
||||
except OSError as err:
|
||||
self.assertIs(err.filename, name)
|
||||
else:
|
||||
self.fail("No exception thrown by {}".format(func))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue