diff --git a/Lib/test/test_zipfile/test_core.py b/Lib/test/test_zipfile/test_core.py index 0f6c0f2107ce6b..519d2ba1a231b5 100644 --- a/Lib/test/test_zipfile/test_core.py +++ b/Lib/test/test_zipfile/test_core.py @@ -1769,13 +1769,9 @@ def test_write_unicode_filenames(self): self.assertEqual(zf.filelist[0].filename, "foo.txt") self.assertEqual(zf.filelist[1].filename, "\xf6.txt") - @requires_zlib() - def test_read_zipfile_containing_unicode_path_extra_field(self): + def create_zipfile_with_extra_data(self, filename, extra_data_name): with zipfile.ZipFile(TESTFN, mode='w') as zf: - # create a file with a non-ASCII name - filename = '이름.txt' - filename_encoded = filename.encode('utf-8') - + filename_encoded = filename.encode("utf-8") # create a ZipInfo object with Unicode path extra field zip_info = zipfile.ZipInfo(filename) @@ -1785,7 +1781,7 @@ def test_read_zipfile_containing_unicode_path_extra_field(self): import zlib filename_crc = struct.pack('