MCPcopy
hub / github.com/pex-tool/pex / test_zip64_fail_fast

Function test_zip64_fail_fast

tests/test_zip_utils.py:22–38  ·  view source on GitHub ↗
(tmpdir)

Source from the content-addressed store, hash-verified

20
21
22def test_zip64_fail_fast(tmpdir):
23 zip_file = os.path.join(str(tmpdir), "zip_file")
24 with open_zip(zip_file, "w") as zip_fp:
25 for x in range(100000):
26 zip_fp.writestr("{x}.txt".format(x=x), bytes(x))
27
28 with pytest.raises(
29 ZipError,
30 match=re.escape(
31 "The zip at {path} requires Zip64 support.{eol}"
32 "The disk_cd_record_count field of the EndOfCentralDirectoryRecord record has value "
33 "65535 indicating Zip64 support is required, but Zip64 support is not implemented.{eol}"
34 "Please file an issue at https://github.com/pex-tool/pex/issues/new that includes "
35 "this full backtrace if you need this support.".format(path=zip_file, eol=os.linesep)
36 ),
37 ):
38 Zip.load(zip_file)
39
40
41def assert_zipapp(

Callers

nothing calls this directly

Calls 3

open_zipFunction · 0.90
joinMethod · 0.45
loadMethod · 0.45

Tested by

no test coverage detected