• Home
  • Raw
  • Download

Lines Matching full:zipfile

16 import zipfile
51 cls.line_gen = [bytes("Zipfile test line %d. random float: %f\n" %
64 with zipfile.ZipFile(f, "w", **kwargs) as zipfp:
76 with zipfile.ZipFile(f, "r", compression) as zipfp:
134 with zipfile.ZipFile(f, "r", compression) as zipfp:
161 with zipfile.ZipFile(path, "r", self.compression) as zipfp:
168 with zipfile.ZipFile(f, "r", compression) as zipfp:
187 with zipfile.ZipFile(f, "r") as zipfp, \
206 with zipfile.ZipFile(f, "r") as zipfp, \
226 with zipfile.ZipFile(f, "r") as zipfp, \
251 with zipfile.ZipFile(f, "r") as zipfp:
265 with zipfile.ZipFile(f, "r") as zipfp:
279 with zipfile.ZipFile(f, "r") as zipfp:
291 with zipfile.ZipFile(TESTFN2, "w", self.compression) as zipfp:
295 with zipfile.ZipFile(TESTFN2, "r", self.compression) as zipfp:
301 zipfp = zipfile.ZipFile(TESTFN2, "w")
307 zipfp = zipfile.ZipFile(TESTFN2, "w", compresslevel=1)
328 with zipfile.ZipFile(io.BytesIO(), "w", self.compression) as zipf:
336 with zipfile.ZipFile(fp, mode='w') as zipf:
342 with zipfile.ZipFile(fp) as zipf:
349 with zipfile.ZipFile(fp) as zipf:
357 with zipfile.ZipFile(fp) as zipf:
367 with zipfile.ZipFile(f, 'w', self.compression) as zipfp:
372 with zipfile.ZipFile(f, 'r') as zipfp:
383 if self.compression != zipfile.ZIP_STORED:
390 if self.compression != zipfile.ZIP_STORED:
402 with zipfile.ZipFile(TESTFN2, "w", compresslevel=1) as zipfp:
424 with zipfile.ZipFile(testfile, 'w', self.compression) as zipfp:
437 with zipfile.ZipFile(io.BytesIO(testfile.getvalue())) as zipfp:
441 with zipfile.ZipFile(io.BytesIO(testfile.getvalue())) as zipfp:
454 compression = zipfile.ZIP_STORED
463 with zipfile.ZipFile(f, "r") as zipfp:
472 self.zip_test_writestr_permissions(f, zipfile.ZIP_STORED)
475 with zipfile.ZipFile(TESTFN2, "w", zipfile.ZIP_STORED) as zipfp:
478 with zipfile.ZipFile(TESTFN2, "r", zipfile.ZIP_STORED) as zipfp:
482 """Test appending to an existing zipfile."""
483 with zipfile.ZipFile(TESTFN2, "w", zipfile.ZIP_STORED) as zipfp:
486 with zipfile.ZipFile(TESTFN2, "a", zipfile.ZIP_STORED) as zipfp:
491 """Test appending to an existing file that is not a zipfile."""
494 data = b'I am not a ZipFile!'*10
498 with zipfile.ZipFile(TESTFN2, "a", zipfile.ZIP_STORED) as zipfp:
503 with zipfile.ZipFile(f, "r") as zipfp:
509 with io.BytesIO(zipfiledata) as bio, zipfile.ZipFile(bio) as zipfp:
515 with zipfile.ZipFile(bio, 'w', zipfile.ZIP_STORED) as zipfp:
518 data = b'I am not a ZipFile!'*10
523 with zipfile.ZipFile(TESTFN2) as zipfp:
529 with zipfile.ZipFile(bio, 'w', zipfile.ZIP_STORED) as zipfp:
532 data = b'I am not a ZipFile!'*1000000
537 with zipfile.ZipFile(TESTFN2, 'a') as zipfp:
544 with io.BytesIO(zipfiledata) as bio, zipfile.ZipFile(bio) as zipfp:
550 with zipfile.ZipFile(TESTFN2, "w", zipfile.ZIP_STORED) as zipfp:
554 with zipfile.ZipFile(TESTFN2, "r") as zipfp:
555 self.assertIsInstance(zipfp, zipfile.ZipFile)
558 with zipfile.ZipFile(TESTFN2, "w", zipfile.ZIP_STORED) as zipfp:
563 with zipfile.ZipFile(TESTFN2, "r") as zipfp:
564 self.assertIsInstance(zipfp, zipfile.ZipFile)
568 """Check that calling ZipFile.write without arcname specified
570 with zipfile.ZipFile(TESTFN2, "w") as zipfp:
577 with zipfile.ZipFile(TESTFN2, mode="w") as zipfp:
580 with zipfile.ZipFile(TESTFN2, mode="r") as zipfp:
590 """Check that trying to call write() on a readonly ZipFile object
592 with zipfile.ZipFile(TESTFN2, mode="w") as zipfp:
595 with zipfile.ZipFile(TESTFN2, mode="r") as zipfp:
598 with zipfile.ZipFile(TESTFN2, mode="r") as zipfp:
605 with zipfile.ZipFile(TESTFN2, "w") as zipfp:
608 with zipfile.ZipFile(TESTFN2, "w", strict_timestamps=False) as zipfp:
637 with zipfile.ZipFile(TESTFN2, "w") as zipfp:
640 with zipfile.ZipFile(TESTFN2, "w", strict_timestamps=False) as zipfp:
649 compression = zipfile.ZIP_DEFLATED
654 with zipfile.ZipFile(TESTFN2, "w") as zipfp:
655 zipfp.write(TESTFN, 'storeme', zipfile.ZIP_STORED)
656 zipfp.write(TESTFN, 'deflateme', zipfile.ZIP_DEFLATED)
659 self.assertEqual(sinfo.compress_type, zipfile.ZIP_STORED)
660 self.assertEqual(dinfo.compress_type, zipfile.ZIP_DEFLATED)
665 compression = zipfile.ZIP_BZIP2
670 compression = zipfile.ZIP_LZMA
679 line_gen = (bytes("Test of zipfile line %d." % i, "ascii")
684 self._limit = zipfile.ZIP64_LIMIT
685 self._filecount_limit = zipfile.ZIP_FILECOUNT_LIMIT
686 zipfile.ZIP64_LIMIT = 1000
687 zipfile.ZIP_FILECOUNT_LIMIT = 9
695 with zipfile.ZipFile(f, "w", compression, allowZip64=True) as zipfp:
701 with zipfile.ZipFile(f, "r", compression) as zipfp:
756 # and that the resulting archive can be read properly by ZipFile
757 zipf = zipfile.ZipFile(TESTFN, "w", self.compression,
766 zipf2 = zipfile.ZipFile(TESTFN, "r", self.compression)
774 zipf = zipfile.ZipFile(TESTFN, "w", self.compression,
781 with self.assertRaises(zipfile.LargeZipFile):
786 zipf = zipfile.ZipFile(TESTFN, "a", self.compression,
790 with self.assertRaises(zipfile.LargeZipFile):
795 zipf = zipfile.ZipFile(TESTFN, "a", self.compression,
805 zipf2 = zipfile.ZipFile(TESTFN, "r", self.compression)
813 zipfile.ZIP64_LIMIT = self._limit
814 zipfile.ZIP_FILECOUNT_LIMIT = self._filecount_limit
821 compression = zipfile.ZIP_STORED
824 with zipfile.ZipFile(f, "w", compression, allowZip64=False) as zipfp:
825 self.assertRaises(zipfile.LargeZipFile,
829 with zipfile.ZipFile(f, "w", compression, allowZip64=False) as zipfp:
830 self.assertRaises(zipfile.LargeZipFile,
835 self.large_file_exception_test(f, zipfile.ZIP_STORED)
836 self.large_file_exception_test2(f, zipfile.ZIP_STORED)
839 with zipfile.ZipFile(TESTFN2, "w", zipfile.ZIP_STORED,
843 with zipfile.ZipFile(TESTFN2, "r", zipfile.ZIP_STORED) as zipfp:
849 with zipfile.ZipFile(TESTFN2, "w", allowZip64=True) as zipfp:
851 with zipfile.ZipFile(TESTFN2, "r", allowZip64=True) as zipfp:
854 with zipfile.ZipFile(TESTFN2, "a", allowZip64=True) as zipfp:
856 with zipfile.ZipFile(TESTFN2, "r", allowZip64=True) as zipfp:
980 with self.assertRaises(zipfile.BadZipFile) as e:
981 zipfile.ZipFile(io.BytesIO(missing_file_size_extra))
991 with self.assertRaises(zipfile.BadZipFile) as e:
992 zipfile.ZipFile(io.BytesIO(missing_compress_size_extra))
1000 with self.assertRaises(zipfile.BadZipFile) as e:
1001 zipfile.ZipFile(io.BytesIO(missing_compress_size_extra))
1014 with self.assertRaises(zipfile.BadZipFile) as e:
1015 zipfile.ZipFile(io.BytesIO(missing_header_offset_extra))
1026 with self.assertRaises(zipfile.BadZipFile) as e:
1027 zipfile.ZipFile(io.BytesIO(missing_header_offset_extra))
1038 with self.assertRaises(zipfile.BadZipFile) as e:
1039 zipfile.ZipFile(io.BytesIO(missing_header_offset_extra))
1049 with self.assertRaises(zipfile.BadZipFile) as e:
1050 zipfile.ZipFile(io.BytesIO(missing_header_offset_extra))
1073 with zipfile.ZipFile(io.BytesIO(self.make_zip64_file(**kwargs))) as zf:
1084 compression = zipfile.ZIP_DEFLATED
1089 compression = zipfile.ZIP_BZIP2
1094 compression = zipfile.ZIP_LZMA
1104 with zipfile.ZipFile(TESTFN2, "w", self.compression) as zipf:
1115 with zipfile.ZipFile(TESTFN2, "w", self.compression) as zipf:
1126 with zipfile.ZipFile(io.BytesIO(), 'w', self.compression) as zip:
1132 compression = zipfile.ZIP_STORED
1136 compression = zipfile.ZIP_DEFLATED
1140 compression = zipfile.ZIP_BZIP2
1144 compression = zipfile.ZIP_LZMA
1167 with TemporaryFile() as t, zipfile.PyZipFile(t, "w") as zipfp:
1184 with TemporaryFile() as t, zipfile.PyZipFile(t, "w") as zipfp:
1200 with TemporaryFile() as t, zipfile.PyZipFile(t, "w") as zipfp:
1214 with TemporaryFile() as t, zipfile.PyZipFile(t, "w") as zipfp:
1247 zipfile.PyZipFile(t, "w", optimize=optlevel) as zipfp:
1266 with TemporaryFile() as t, zipfile.PyZipFile(t, "w") as zipfp:
1286 with TemporaryFile() as t, zipfile.PyZipFile(t, "w") as zipfp:
1298 with TemporaryFile() as t, zipfile.PyZipFile(t, "w") as zipfp:
1310 with TemporaryFile() as t, zipfile.PyZipFile(t, "w") as zipfp:
1332 with TemporaryFile() as t, zipfile.PyZipFile(t, "w") as zipfp:
1343 with zipfile.ZipFile(TESTFN2, "w", zipfile.ZIP_STORED) as zipfp:
1350 with zipfile.ZipFile(TESTFN2, "r") as zipfp:
1368 with zipfile.ZipFile(TESTFN2, "r") as zipfp:
1396 with zipfile.ZipFile(TESTFN2, "r") as zipfp:
1408 with zipfile.ZipFile(TESTFN2, "r") as zipfp:
1434 san = zipfile.ZipFile._sanitize_windows_name
1491 with zipfile.ZipFile(TESTFN2, 'w', zipfile.ZIP_STORED) as zipfp:
1492 zinfo = zipfile.ZipInfo()
1502 with zipfile.ZipFile(TESTFN2, 'r') as zipfp:
1510 with zipfile.ZipFile(TESTFN2, 'r') as zipfp:
1517 with zipfile.ZipFile(TESTFN2, 'r') as zipfp:
1524 with zipfile.ZipFile(TESTFN2, 'r') as zipfp:
1535 with zipfile.ZipFile(TESTFN2, "w", zipfile.ZIP_STORED) as zipfp:
1541 with zipfile.ZipFile(TESTFN2, "r") as zipfp:
1554 with zipfile.ZipFile(TESTFN2, 'w') as orig_zip:
1556 zinfo = zipfile.ZipInfo(data)
1561 """Check that the zipfile is closed after the 'with' block."""
1562 with zipfile.ZipFile(TESTFN2, "w") as zipfp:
1568 with zipfile.ZipFile(TESTFN2, "r") as zipfp:
1573 """Check that the zipfile is closed if an exception is raised in the
1575 with zipfile.ZipFile(TESTFN2, "w") as zipfp:
1580 with zipfile.ZipFile(TESTFN2, "r") as zipfp2:
1581 raise zipfile.BadZipFile()
1582 except zipfile.BadZipFile:
1593 self.assertRaises(NotImplementedError, zipfile.ZipFile,
1600 with zipfile.ZipFile(fname) as zipfp:
1605 with zipfile.ZipFile(TESTFN, "w") as zf:
1610 with zipfile.ZipFile(TESTFN, "r") as zf:
1615 with zipfile.ZipFile(TESTFN2, 'w') as zipfp:
1620 """Test exclusive creating a new zipfile."""
1624 with zipfile.ZipFile(TESTFN2, "x", zipfile.ZIP_STORED) as zipfp:
1627 zipfile.ZipFile(TESTFN2, "x", zipfile.ZIP_STORED)
1628 with zipfile.ZipFile(TESTFN2, "r") as zipfp:
1640 with zipfile.ZipFile(TESTFN, 'a') as zf:
1647 with zipfile.ZipFile(TESTFN, 'r') as zf:
1651 # This test checks that the ZipFile constructor closes the file object
1653 # traceback holds a reference to the ZipFile object and, indirectly,
1661 zf = zipfile.ZipFile(TESTFN)
1662 except zipfile.BadZipFile:
1670 self.assertFalse(zipfile.is_zipfile(TESTFN))
1672 self.assertFalse(zipfile.is_zipfile(pathlib.Path(TESTFN)))
1675 self.assertFalse(zipfile.is_zipfile(fp))
1679 self.assertFalse(zipfile.is_zipfile(fp))
1681 self.assertFalse(zipfile.is_zipfile(fp))
1687 with zipfile.ZipFile(fp, mode="w") as zipf:
1695 self.assertRaises(zipfile.BadZipFile, zipfile.ZipFile, fp)
1700 with zipfile.ZipFile(TESTFN, mode="w") as zipf:
1703 self.assertTrue(zipfile.is_zipfile(TESTFN))
1706 self.assertTrue(zipfile.is_zipfile(fp))
1712 self.assertTrue(zipfile.is_zipfile(fp))
1714 self.assertTrue(zipfile.is_zipfile(fp))
1718 # ZipFile instance is finalized; this tests for regression on SF tracker
1722 # when a ZipFile instance was created for a file that did not
1728 self.assertRaises(OSError, zipfile.ZipFile, TESTFN)
1733 self.assertRaises(zipfile.BadZipFile, zipfile.ZipFile, TESTFN)
1737 self.assertRaises(zipfile.BadZipFile, zipfile.ZipFile, TESTFN)
1742 with zipfile.ZipFile(data, mode="w") as zipf:
1745 # This is correct; calling .read on a closed ZipFile should raise
1754 f.write('zipfile test data')
1758 """Check that bad modes passed to ZipFile constructor are caught."""
1759 self.assertRaises(ValueError, zipfile.ZipFile, TESTFN, "q")
1762 """Check that bad modes passed to ZipFile.open are caught."""
1763 with zipfile.ZipFile(TESTFN, mode="w") as zipf:
1766 with zipfile.ZipFile(TESTFN, mode="r") as zipf:
1777 with zipfile.ZipFile(TESTFN, mode="w") as zipf:
1789 with zipfile.ZipFile(TESTFN, mode="w") as zipf:
1793 """Check that bad compression methods passed to ZipFile.open are
1795 self.assertRaises(NotImplementedError, zipfile.ZipFile, TESTFN, "w", -1)
1805 with zipfile.ZipFile(io.BytesIO(data), 'r') as zipf:
1811 with zipfile.ZipFile(TESTFN, mode="w") as zipf:
1817 self.assertEqual(zipfile.sizeEndCentDir, 22)
1818 self.assertEqual(zipfile.sizeCentralDir, 46)
1819 self.assertEqual(zipfile.sizeEndCentDir64, 56)
1820 self.assertEqual(zipfile.sizeEndCentDir64Locator, 20)
1826 with zipfile.ZipFile(TESTFN, mode="w") as zipf:
1830 with zipfile.ZipFile(TESTFN, mode="r") as zipfr:
1835 with zipfile.ZipFile(TESTFN, mode="w") as zipf:
1838 with zipfile.ZipFile(TESTFN, mode="r") as zipfr:
1844 with zipfile.ZipFile(TESTFN, mode="w") as zipf:
1848 with zipfile.ZipFile(TESTFN, mode="r") as zipfr:
1852 with zipfile.ZipFile(TESTFN, mode="w") as zipf:
1856 with zipfile.ZipFile(TESTFN, mode="r") as zipfr:
1860 with zipfile.ZipFile(TESTFN,mode="w") as zipf:
1863 with zipfile.ZipFile(TESTFN,mode="a") as zipf:
1865 with zipfile.ZipFile(TESTFN,mode="r") as zipf:
1870 with zipfile.ZipFile(TESTFN,mode="w") as zipf:
1874 with zipfile.ZipFile(TESTFN,mode="a") as zipf:
1877 with zipfile.ZipFile(TESTFN,mode="r") as zipf:
1881 with zipfile.ZipFile(TESTFN, "w", zipfile.ZIP_STORED) as zipf:
1887 with zipfile.ZipFile(TESTFN, "a", zipfile.ZIP_STORED) as zipf:
1890 with zipfile.ZipFile(TESTFN, "r") as zipf:
1894 with zipfile.ZipFile(TESTFN, "w", zipfile.ZIP_STORED) as zipf:
1896 with zipfile.ZipFile(TESTFN, "a", zipfile.ZIP_STORED) as zipf:
1899 with zipfile.ZipFile(TESTFN, "r") as zipf:
1905 zipf = zipfile.ZipFile(TESTFN, mode="w")
1908 zipf = zipfile.ZipFile(TESTFN, mode="r")
1909 except zipfile.BadZipFile:
1912 zipf = zipfile.ZipFile(TESTFN, mode="a")
1915 zipf = zipfile.ZipFile(TESTFN, mode="r")
1925 self.assertRaises(zipfile.BadZipFile, zipfile.ZipFile, TESTFN, 'r')
1929 zipfile.ZipInfo, 'seventies', (1979, 1, 1, 0, 0, 0))
1933 zi = zipfile.ZipInfo(filename="empty")
1938 zi = zipfile.ZipInfo()
1942 self.assertEqual(zi.compress_type, zipfile.ZIP_STORED)
1946 self.assertEqual(zi.create_version, zipfile.DEFAULT_VERSION)
1947 self.assertEqual(zi.extract_version, zipfile.DEFAULT_VERSION)
1969 with zipfile.ZipFile(io.BytesIO(zipdata), 'r') as zipf:
1978 with zipfile.ZipFile(TESTFN2, 'w', zipfile.ZIP_STORED) as zipf:
1996 with zipfile.ZipFile(TESTFN2, 'r') as zipf:
2007 with zipfile.ZipFile(TESTFN, "w") as zipf:
2009 with zipfile.ZipFile(TESTFN, "r") as zipf:
2024 with zipfile.ZipFile(data, mode="w") as zipf:
2026 with zipfile.ZipFile(data, mode="r") as zipf:
2044 with zipfile.ZipFile(zip_file, 'w', compression=zipfile.ZIP_BZIP2) as zf:
2046 with mock.patch('zipfile.bz2', None):
2047 with zipfile.ZipFile(zip_file) as zf:
2060 with zipfile.ZipFile(io.BytesIO(zipdata), mode="r") as zipf:
2068 # Using ZipFile.read()
2069 with zipfile.ZipFile(io.BytesIO(zipdata), mode="r") as zipf:
2070 self.assertRaises(zipfile.BadZipFile, zipf.read, 'afile')
2073 with zipfile.ZipFile(io.BytesIO(zipdata), mode="r") as zipf:
2075 self.assertRaises(zipfile.BadZipFile, corrupt_file.read)
2078 with zipfile.ZipFile(io.BytesIO(zipdata), mode="r") as zipf:
2081 with self.assertRaises(zipfile.BadZipFile):
2087 compression = zipfile.ZIP_STORED
2100 compression = zipfile.ZIP_DEFLATED
2113 compression = zipfile.ZIP_BZIP2
2129 compression = zipfile.ZIP_LZMA
2165 plain = b'zipfile.py encryption test'
2171 self.zip = zipfile.ZipFile(TESTFN, "r")
2174 self.zip2 = zipfile.ZipFile(TESTFN2, "r")
2263 with zipfile.ZipFile(f, "w", compression) as zipfp:
2271 with zipfile.ZipFile(f, "r", compression) as zipfp:
2285 with zipfile.ZipFile(f, "r", compression) as zipfp:
2318 with zipfile.ZipFile(f, "r", compression) as zipfp:
2338 compression = zipfile.ZIP_STORED
2343 compression = zipfile.ZIP_DEFLATED
2348 compression = zipfile.ZIP_BZIP2
2353 compression = zipfile.ZIP_LZMA
2390 with zipfile.ZipFile(wrapper(bf), 'w', zipfile.ZIP_STORED) as zipfp:
2394 with zipfile.ZipFile(f, mode='r') as zipf:
2406 with zipfile.ZipFile(wrapper(bf), 'w', zipfile.ZIP_STORED) as zipfp:
2415 with zipfile.ZipFile(f, mode='r') as zipf:
2427 with zipfile.ZipFile(wrapper(bf), 'w', zipfile.ZIP_STORED) as zipf:
2433 with zipfile.ZipFile(f) as zipf:
2447 with zipfile.ZipFile(f, "w", zipfile.ZIP_DEFLATED) as zipfp:
2452 # Verify that (when the ZipFile is in control of creating file objects)
2456 with zipfile.ZipFile(f, mode="r") as zipf:
2466 # Verify that (when the ZipFile is in control of creating file objects)
2470 with zipfile.ZipFile(f, mode="r") as zipf:
2480 # Verify that (when the ZipFile is in control of creating file objects)
2484 with zipfile.ZipFile(f, mode="r") as zipf:
2498 with zipfile.ZipFile(f, 'r') as zipf:
2510 with zipfile.ZipFile(f, 'w', zipfile.ZIP_DEFLATED) as zipf:
2516 with zipfile.ZipFile(f, 'r') as zipf:
2524 with zipfile.ZipFile(f, "w", zipfile.ZIP_DEFLATED) as zipf:
2529 with zipfile.ZipFile(f, 'r') as zipf:
2539 with zipfile.ZipFile(TESTFN2, mode="r") as zipf:
2548 with zipfile.ZipFile(TESTFN2, 'w', zipfile.ZIP_DEFLATED) as zipf:
2550 with zipfile.ZipFile(TESTFN2, 'a', zipfile.ZIP_DEFLATED) as zipf:
2557 with zipfile.ZipFile(TESTFN2) as zipf:
2569 with zipfile.ZipFile(findfile("zipdir.zip")) as zipf:
2584 with zipfile.ZipFile(TESTFN, "w") as zipf:
2593 with zipfile.ZipFile(TESTFN, "r") as zipf:
2608 with zipfile.ZipFile(TESTFN, "w") as zipf:
2613 with zipfile.ZipFile(TESTFN, "r") as zipf:
2631 zi = zipfile.ZipInfo.from_file(__file__)
2637 zi = zipfile.ZipInfo.from_file(pathlib.Path(__file__))
2643 zi = zipfile.ZipInfo.from_file(os.fsencode(__file__), 'test')
2650 zi = zipfile.ZipInfo.from_file(f.fileno(), 'test')
2657 zi = zipfile.ZipInfo.from_file(dirpath, 'stdlib_tests')
2660 self.assertEqual(zi.compress_type, zipfile.ZIP_STORED)
2667 rc, out, err = script_helper.assert_python_ok('-m', 'zipfile', *args,
2672 return script_helper.assert_python_failure('-m', 'zipfile', *args)
2696 with zipfile.ZipFile(zip_name, 'r') as tf:
2719 with zipfile.ZipFile(TESTFN2) as zf:
2732 with zipfile.ZipFile(zip_name) as zf:
2753 self.assertTrue(zipfile.is_zipfile(name),
2755 # Ensure we can operate on these via ZipFile.
2756 with zipfile.ZipFile(name) as zipfp:
2808 for name in zipfile.CompleteDirs._implied_dirs(zf.namelist()):
2839 zf = zipfile.ZipFile(data, "w")
2885 root = zipfile.Path(alpharep)
2901 root = zipfile.Path(alpharep)
2906 root = zipfile.Path(alpharep)
2913 root = zipfile.Path(alpharep)
2921 root = zipfile.Path(alpharep)
2929 If the zipfile is open for write, it should be possible to
2932 zf = zipfile.Path(zipfile.ZipFile(io.BytesIO(), mode='w'))
2942 zf = zipfile.Path(add_dirs(build_alpharep_fixture()))
2948 root = zipfile.Path(alpharep)
2958 zf = zipfile.Path(add_dirs(build_alpharep_fixture()))
2964 root = zipfile.Path(alpharep)
2971 root = zipfile.Path(alpharep)
2979 root = zipfile.Path(alpharep)
2985 root = zipfile.Path(alpharep)
2997 source="zipfile.Path(alpharep) / 'a'",
3007 zipfile.Path should be constructable from a path-like object
3011 zipfile.Path(pathlike)
3015 root = zipfile.Path(alpharep)
3020 root = zipfile.Path(alpharep)
3026 root = zipfile.Path(alpharep)
3032 root = zipfile.Path(alpharep)
3038 If the underlying zipfile is changed, the Path object should
3041 root = zipfile.Path(alpharep)
3053 """Create a read-only zipfile with a huge number of entries entries."""
3055 zf = zipfile.ZipFile(strm, "w")
3063 Ensure joinpath on items in zipfile is linear time.
3065 root = zipfile.Path(self.huge_zipfile())
3075 zipfile.CompleteDirs._implied_dirs(data)
3080 with zipfile.ZipFile(alpharep) as file:
3082 zipfile.Path(file, 'a.txt').read_text(encoding="utf-8")
3086 class Subclass(zipfile.Path):
3094 root = zipfile.Path(alpharep)
3100 The name of the root should be the name of the zipfile
3102 root = zipfile.Path(alpharep)
3107 root = zipfile.Path(alpharep)
3116 or parent of an unnamed zipfile.
3119 root = zipfile.Path(alpharep)
3132 cls = type('PathChild', (zipfile.Path,), {})