[Python-checkins] cpython (merge 3.3 -> default): (Merge 3.3) Issue #9644: Add a test on os.statvfs() for the PEP 383

victor.stinner python-checkins at python.org
Tue Jan 1 23:18:09 CET 2013


http://hg.python.org/cpython/rev/dbe607fdc271
changeset:   81209:dbe607fdc271
parent:      81206:a758f561a280
parent:      81208:b0cc0b9e2472
user:        Victor Stinner <victor.stinner at gmail.com>
date:        Tue Jan 01 23:17:22 2013 +0100
summary:
  (Merge 3.3) Issue #9644: Add a test on os.statvfs() for the PEP 383

files:
  Lib/test/test_os.py |  9 +++++++++
  1 files changed, 9 insertions(+), 0 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
@@ -1342,6 +1342,15 @@
                 f = open(os.path.join(self.dir, fn), 'rb')
                 f.close()
 
+        @unittest.skipUnless(hasattr(os, 'statvfs'),
+                             "need os.statvfs()")
+        def test_statvfs(self):
+            # issue #9645
+            for fn in self.unicodefn:
+                # should not fail with file not found error
+                fullname = os.path.join(self.dir, fn)
+                os.statvfs(fullname)
+
         def test_stat(self):
             for fn in self.unicodefn:
                 os.stat(os.path.join(self.dir, fn))

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


More information about the Python-checkins mailing list