| 20 | |
| 21 | |
| 22 | def 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 | |
| 41 | def assert_zipapp( |