mirror of
https://github.com/python/cpython.git
synced 2025-10-17 20:28:43 +00:00
Stop printing listdir bytestring output, as the precise list of strings
returned depends on the filesystem encoding.
This commit is contained in:
parent
cd24699256
commit
d6eb3523f6
2 changed files with 2 additions and 3 deletions
|
@ -78,11 +78,11 @@ class UnicodeFileTests(unittest.TestCase):
|
|||
|
||||
def test_listdir(self):
|
||||
f1 = os.listdir(test_support.TESTFN)
|
||||
f1.sort()
|
||||
# Printing f1 is not appropriate, as specific filenames
|
||||
# returned depend on the local encoding
|
||||
f2 = os.listdir(unicode(test_support.TESTFN,
|
||||
sys.getfilesystemencoding()))
|
||||
f2.sort()
|
||||
print f1
|
||||
print f2
|
||||
|
||||
def test_rename(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue