diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2008-05-05 17:47:06 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2008-05-05 17:47:06 (GMT) |
commit | c3ad68c88a5c7eab2c70fa3a58aab547f60f61e0 (patch) | |
tree | 0cc1dd85baca916346eac70c02e76c75a6af1030 | |
parent | 471617d6d324ca3d119ddaa7206d4b902475e4be (diff) | |
download | cpython-c3ad68c88a5c7eab2c70fa3a58aab547f60f61e0.zip cpython-c3ad68c88a5c7eab2c70fa3a58aab547f60f61e0.tar.gz cpython-c3ad68c88a5c7eab2c70fa3a58aab547f60f61e0.tar.bz2 |
Fix Unicode filename test.
-rw-r--r-- | Lib/test/test_zipfile.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Lib/test/test_zipfile.py b/Lib/test/test_zipfile.py index ace5a88..c83622a 100644 --- a/Lib/test/test_zipfile.py +++ b/Lib/test/test_zipfile.py @@ -556,11 +556,13 @@ class OtherTests(unittest.TestCase): def testUnicodeFilenames(self): zf = zipfile.ZipFile(TESTFN, "w") zf.writestr(u"foo.txt", "Test for unicode filename") - zf.writestr(u"fo\xf6.txt", "Test for unicode filename") - assert isinstance(zf.infolist()[0].filename, unicode) + zf.writestr(u"\xf6.txt", "Test for unicode filename") + self.assertTrue(isinstance(zf.infolist()[0].filename, unicode)) + zf.close() + zf = zipfile.ZipFile(TESTFN, "r") + self.assertEqual(zf.filelist[0].filename, "foo.txt") + self.assertEqual(zf.filelist[1].filename, u"\xf6.txt") zf.close() - zf = zipfile.ZipFile(TESTFN, "w") - def testCreateNonExistentFileForAppend(self): if os.path.exists(TESTFN): |