Commit f255b69e authored by Martin v. Löwis's avatar Martin v. Löwis

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.
........
parent 6c173ee8
...@@ -544,10 +544,12 @@ class OtherTests(unittest.TestCase): ...@@ -544,10 +544,12 @@ class OtherTests(unittest.TestCase):
def testUnicodeFilenames(self): def testUnicodeFilenames(self):
zf = zipfile.ZipFile(TESTFN, "w") zf = zipfile.ZipFile(TESTFN, "w")
zf.writestr("foo.txt", "Test for unicode filename") 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, "r")
self.assertEqual(zf.filelist[0].filename, "foo.txt")
self.assertEqual(zf.filelist[1].filename, "\xf6.txt")
zf.close() zf.close()
zf = zipfile.ZipFile(TESTFN, "w")
def testCreateNonExistentFileForAppend(self): def testCreateNonExistentFileForAppend(self):
if os.path.exists(TESTFN): if os.path.exists(TESTFN):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment