[Python-checkins] r87606 - python/branches/py3k/Lib/test/test_zipfile.py
georg.brandl
python-checkins at python.org
Sat Jan 1 11:42:32 CET 2011
Author: georg.brandl
Date: Sat Jan 1 11:42:31 2011
New Revision: 87606
Log:
#10801: do not actually extract, just open() the files in the test zipfile.
Modified:
python/branches/py3k/Lib/test/test_zipfile.py
Modified: python/branches/py3k/Lib/test/test_zipfile.py
==============================================================================
--- python/branches/py3k/Lib/test/test_zipfile.py (original)
+++ python/branches/py3k/Lib/test/test_zipfile.py Sat Jan 1 11:42:31 2011
@@ -490,16 +490,11 @@
self.assertTrue(zipfp2.fp is None, 'zipfp is not closed')
def test_unicode_filenames(self):
- if __name__ == '__main__':
- myfile = sys.argv[0]
- else:
- myfile = __file__
-
- mydir = os.path.dirname(myfile) or os.curdir
- fname = os.path.join(mydir, 'zip_cp437_header.zip')
-
+ # bug #10801
+ fname = findfile('zip_cp437_header.zip')
with zipfile.ZipFile(fname) as zipfp:
- zipfp.extractall()
+ for name in zipfp.namelist():
+ zipfp.open(name).close()
def tearDown(self):
unlink(TESTFN)
More information about the Python-checkins
mailing list