Commits

Victor Stinner committed ef87bd0

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.

  • Participants
  • Parent commits 01cc9fb

Comments (0)

Files changed (1)

File Lib/test/test_os.py

             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))