From: Martin v. Löwis Date: Sun, 7 Nov 2004 20:01:56 +0000 (+0000) Subject: Stop printing listdir bytestring output, as the precise list of strings X-Git-Tag: v2.4c1~66 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d6eb3523f624563bcec9fb97401c9f7b646d7e15;p=thirdparty%2FPython%2Fcpython.git Stop printing listdir bytestring output, as the precise list of strings returned depends on the filesystem encoding. --- diff --git a/Lib/test/output/test_pep277 b/Lib/test/output/test_pep277 index 43bd9e1bbb28..75e50271cc9d 100644 --- a/Lib/test/output/test_pep277 +++ b/Lib/test/output/test_pep277 @@ -1,4 +1,3 @@ test_pep277 u'\xdf-\u66e8\u66e9\u66eb' -['???', '???', '??????', '????????????', '????G\xdf', 'Ge??-sa?', 'Gr\xfc\xdf-Gott', 'abc', 'ascii'] [u'Gr\xfc\xdf-Gott', u'abc', u'ascii', u'\u0393\u03b5\u03b9\u03ac-\u03c3\u03b1\u03c2', u'\u0417\u0434\u0440\u0430\u0432\u0441\u0442\u0432\u0443\u0439\u0442\u0435', u'\u05d4\u05e9\u05e7\u05e6\u05e5\u05e1', u'\u306b\u307d\u3093', u'\u66e8\u05e9\u3093\u0434\u0393\xdf', u'\u66e8\u66e9\u66eb'] diff --git a/Lib/test/test_pep277.py b/Lib/test/test_pep277.py index b48317f6d6cb..f3070893f60e 100644 --- a/Lib/test/test_pep277.py +++ b/Lib/test/test_pep277.py @@ -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):