summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_os.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2013-01-01 22:05:55 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2013-01-01 22:05:55 (GMT)
commite4110dc11f9e90d3a7fcd8f0a5f9ded344f433c6 (patch)
treeee1a8b42b8180f001903e511364ea187e1f8dff6 /Lib/test/test_os.py
parent8c126d7abd67fbb88a58d0efbdad573fc6043e76 (diff)
downloadcpython-e4110dc11f9e90d3a7fcd8f0a5f9ded344f433c6.zip
cpython-e4110dc11f9e90d3a7fcd8f0a5f9ded344f433c6.tar.gz
cpython-e4110dc11f9e90d3a7fcd8f0a5f9ded344f433c6.tar.bz2
Issue #9644: Fix the encoding used by os.statvfs(): use the filesystem encoding
with the surrogateescape error handler, instead of UTF-8 in strict mode.
Diffstat (limited to 'Lib/test/test_os.py')
-rw-r--r--Lib/test/test_os.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py
index 5b67da1..bd799b2 100644
--- a/Lib/test/test_os.py
+++ b/Lib/test/test_os.py
@@ -1057,6 +1057,15 @@ if sys.platform != 'win32':
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))