[Python-checkins] r59519 - in python/trunk/Lib/test: output/test_pep277 test_pep277.py

christian.heimes python-checkins at python.org
Sat Dec 15 06:38:35 CET 2007


Author: christian.heimes
Date: Sat Dec 15 06:38:35 2007
New Revision: 59519

Removed:
   python/trunk/Lib/test/output/test_pep277
Modified:
   python/trunk/Lib/test/test_pep277.py
Log:
Fixed #1624: Remove output comparison for test_pep277
I had to modify Brett's patch slightly.

Deleted: /python/trunk/Lib/test/output/test_pep277
==============================================================================
--- /python/trunk/Lib/test/output/test_pep277	Sat Dec 15 06:38:35 2007
+++ (empty file)
@@ -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']

Modified: python/trunk/Lib/test/test_pep277.py
==============================================================================
--- python/trunk/Lib/test/test_pep277.py	(original)
+++ python/trunk/Lib/test/test_pep277.py	Sat Dec 15 06:38:35 2007
@@ -78,12 +78,12 @@
 
     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 @@
         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)


More information about the Python-checkins mailing list