diff options
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/output/test_pep277 | 3 | ||||
-rw-r--r-- | Lib/test/test_pep277.py | 9 |
2 files changed, 4 insertions, 8 deletions
diff --git a/Lib/test/output/test_pep277 b/Lib/test/output/test_pep277 deleted file mode 100644 index 44a70ec..0000000 --- a/Lib/test/output/test_pep277 +++ /dev/null @@ -1,3 +0,0 @@ -test_pep277 -'\xdf-\u66e8\u66e9\u66eb' -['Gr\xfc\xdf-Gott', 'abc', 'ascii', '\u0393\u03b5\u03b9\u03ac-\u03c3\u03b1\u03c2', '\u0417\u0434\u0440\u0430\u0432\u0441\u0442\u0432\u0443\u0439\u0442\u0435', '\u05d4\u05e9\u05e7\u05e6\u05e5\u05e1', '\u306b\u307d\u3093', '\u66e8\u05e9\u3093\u0434\u0393\xdf', '\u66e8\u66e9\u66eb'] diff --git a/Lib/test/test_pep277.py b/Lib/test/test_pep277.py index 554e011..3c3f9ac 100644 --- a/Lib/test/test_pep277.py +++ b/Lib/test/test_pep277.py @@ -78,12 +78,12 @@ class UnicodeFileTests(unittest.TestCase): def test_listdir(self): f1 = os.listdir(test_support.TESTFN) - # Printing f1 is not appropriate, as specific filenames - # returned depend on the local encoding f2 = os.listdir(str(test_support.TESTFN.encode("utf-8"), sys.getfilesystemencoding())) - f2.sort() - print(f2) + sf2 = set("\\".join((unicode(test_support.TESTFN), f)) + for f in f2) + self.failUnlessEqual(len(f1), len(self.files)) + self.failUnlessEqual(sf2, set(self.files)) def test_rename(self): for name in self.files: @@ -99,7 +99,6 @@ class UnicodeFileTests(unittest.TestCase): f = open(filename, 'wb') f.write((filename + '\n').encode("utf-8")) f.close() - print(repr(filename)) os.access(filename,os.R_OK) os.remove(filename) os.chdir(oldwd) |