[Python-checkins] cpython: Issue #15478: Fix test_os on FreeBSD

victor.stinner python-checkins at python.org
Wed Oct 31 01:13:04 CET 2012


http://hg.python.org/cpython/rev/ef87bd0797de
changeset:   80069:ef87bd0797de
user:        Victor Stinner <victor.stinner at gmail.com>
date:        Wed Oct 31 01:12:55 2012 +0100
summary:
  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.

files:
  Lib/test/test_os.py |  2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py
--- a/Lib/test/test_os.py
+++ b/Lib/test/test_os.py
@@ -2112,7 +2112,7 @@
             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))

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list