mirror of
https://github.com/python/cpython.git
synced 2026-05-16 09:29:00 -04: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:
+1
-1
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user