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.
........
This commit is contained in:
Martin v. Löwis 2008-05-05 17:50:05 +00:00
parent 8570f6a402
commit 1a9f900073
1 changed files with 5 additions and 3 deletions

View File

@ -544,10 +544,12 @@ class OtherTests(unittest.TestCase):
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, "r")
self.assertEqual(zf.filelist[0].filename, "foo.txt")
self.assertEqual(zf.filelist[1].filename, "\xf6.txt")
zf.close()
zf = zipfile.ZipFile(TESTFN, "w")
def testCreateNonExistentFileForAppend(self):
if os.path.exists(TESTFN):