mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
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.
This commit is contained in:
parent
8c126d7abd
commit
e4110dc11f
3 changed files with 20 additions and 3 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue