mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
#10801: do not actually extract, just open() the files in the test zipfile.
This commit is contained in:
parent
5ba11de845
commit
04480a8ae5
1 changed files with 4 additions and 9 deletions
|
@ -490,16 +490,11 @@ class TestsWithSourceFile(unittest.TestCase):
|
|||
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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue