diff options
author | Christian Heimes <christian@cheimes.de> | 2007-12-15 05:38:35 +0000 |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2007-12-15 05:38:35 +0000 |
commit | 17b52afda643e49d74ce4b1f0c9967c87015bf93 (patch) | |
tree | 3ea8d9626adc2bfd9d19a27e2a4edd2add9f2eb2 /Lib/test/test_pep277.py | |
parent | 6c87af5d876dca978199240c258eaaaf2d0040e9 (diff) | |
download | cpython-git-17b52afda643e49d74ce4b1f0c9967c87015bf93.tar.gz |
Fixed #1624: Remove output comparison for test_pep277
I had to modify Brett's patch slightly.
Diffstat (limited to 'Lib/test/test_pep277.py')
-rw-r--r-- | Lib/test/test_pep277.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/Lib/test/test_pep277.py b/Lib/test/test_pep277.py index f3070893f6..cb6210b02c 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) |