Commits

Martin von Löwis committed 86f7383

Merged revisions 62726 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
r62726 | martin.v.loewis | 2008-05-05 19:47:06 +0200 (Mo, 05 Mai 2008) | 2 lines

Fix Unicode filename test.
........

Comments (0)

Files changed (1)

Lib/test/test_zipfile.py

     def testUnicodeFilenames(self):
         zf = zipfile.ZipFile(TESTFN, "w")
         zf.writestr("foo.txt", "Test for unicode filename")
-        zf.writestr("fo\xf6.txt", "Test for unicode filename")
+        zf.writestr("\xf6.txt", "Test for unicode filename")
         zf.close()
-        zf = zipfile.ZipFile(TESTFN, "w")
-
+        zf = zipfile.ZipFile(TESTFN, "r")
+        self.assertEqual(zf.filelist[0].filename, "foo.txt")
+        self.assertEqual(zf.filelist[1].filename, "\xf6.txt")
+        zf.close()
 
     def testCreateNonExistentFileForAppend(self):
         if os.path.exists(TESTFN):