summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2008-05-05 17:50:05 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2008-05-05 17:50:05 (GMT)
commit1a9f900073c7e5e3f01dac552ab232ebe320b598 (patch)
treeb73d62557bbbf39717fb1847c957f39a139bd8d7
parent8570f6a402abc77646b491762fb61a1fa968f432 (diff)
downloadcpython-1a9f900073c7e5e3f01dac552ab232ebe320b598.zip
cpython-1a9f900073c7e5e3f01dac552ab232ebe320b598.tar.gz
cpython-1a9f900073c7e5e3f01dac552ab232ebe320b598.tar.bz2
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. ........
-rw-r--r--Lib/test/test_zipfile.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/Lib/test/test_zipfile.py b/Lib/test/test_zipfile.py
index c69892b..6878262 100644
--- a/Lib/test/test_zipfile.py
+++ b/Lib/test/test_zipfile.py
@@ -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):