From bd54f0eb3aaef0ebf53cdc98bb16979e0add7b08 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Wed, 31 Oct 2012 01:12:55 +0100 Subject: 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. --- Lib/test/test_os.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py index 0d1f60a..a4cf60f 100644 --- a/Lib/test/test_os.py +++ b/Lib/test/test_os.py @@ -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)) -- cgit v0.12