From 17b52afda643e49d74ce4b1f0c9967c87015bf93 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Sat, 15 Dec 2007 05:38:35 +0000 Subject: Fixed #1624: Remove output comparison for test_pep277 I had to modify Brett's patch slightly. --- Lib/test/output/test_pep277 | 3 --- Lib/test/test_pep277.py | 9 ++++----- 2 files changed, 4 insertions(+), 8 deletions(-) delete mode 100644 Lib/test/output/test_pep277 diff --git a/Lib/test/output/test_pep277 b/Lib/test/output/test_pep277 deleted file mode 100644 index 75e5027..0000000 --- a/Lib/test/output/test_pep277 +++ /dev/null @@ -1,3 +0,0 @@ -test_pep277 -u'\xdf-\u66e8\u66e9\u66eb' -[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 f307089..cb6210b 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(unicode(test_support.TESTFN, sys.getfilesystemencoding())) - f2.sort() - print f2 + sf2 = set(u"\\".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, 'w') f.write((filename + '\n').encode("utf-8")) f.close() - print repr(filename) os.access(filename,os.R_OK) os.remove(filename) os.chdir(oldwd) -- cgit v0.12