[Python-checkins] cpython: test_os: report tests as skipped when os.statvfs() fails with ENOSYS

victor.stinner python-checkins at python.org
Sat Oct 12 01:34:11 CEST 2013


http://hg.python.org/cpython/rev/930f9d6373bc
changeset:   86217:930f9d6373bc
user:        Victor Stinner <victor.stinner at gmail.com>
date:        Sat Oct 12 01:33:54 2013 +0200
summary:
  test_os: report tests as skipped when os.statvfs() fails with ENOSYS

files:
  Lib/test/test_os.py |  5 +++--
  1 files changed, 3 insertions(+), 2 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
@@ -281,7 +281,7 @@
         except OSError as e:
             # On AtheOS, glibc always returns ENOSYS
             if e.errno == errno.ENOSYS:
-                return
+                self.skipTest('os.statvfs() failed with ENOSYS')
 
         # Make sure direct access works
         self.assertEqual(result.f_bfree, result[3])
@@ -326,7 +326,8 @@
         except OSError as e:
             # On AtheOS, glibc always returns ENOSYS
             if e.errno == errno.ENOSYS:
-                return
+                self.skipTest('os.statvfs() failed with ENOSYS')
+
         p = pickle.dumps(result)
         self.assertIn(b'\x03cos\nstatvfs_result\n', p)
         unpickled = pickle.loads(p)

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


More information about the Python-checkins mailing list