Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Address review
  • Loading branch information
sobolevn committed Oct 31, 2023
commit 95f1898dad8f277f9c61f88804207644b48a4996
14 changes: 8 additions & 6 deletions Lib/test/archivetestdata/README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,31 @@
# Test data for `test_zipfile`
# Test data for `test_zipfile`, `test_tarfile` (and even some others)

The test executables in this directory are created manually from header.sh and
## `test_zipfile`

The test executables in this directory are created manually from `header.sh` and
the `testdata_module_inside_zip.py` file. You must have infozip's zip utility
installed (`apt install zip` on Debian).

## Purpose
### Purpose of `exe_with_zip` and `exe_with_z64`

These are used to test executable files with an appended zipfile, in a scenario
where the executable is _not_ a Python interpreter itself so our automatic
zipimport machinery (that'd look for `__main__.py`) is not being used.

## Updating the test executables
### Updating the test executables

If you update header.sh or the testdata_module_inside_zip.py file, rerun the
commands below. These are expected to be rarely changed, if ever.

### Standard old format (2.0) zip file
#### Standard old format (2.0) zip file

```
zip -0 zip2.zip testdata_module_inside_zip.py
cat header.sh zip2.zip >exe_with_zip
rm zip2.zip
```

### Modern format (4.5) zip64 file
#### Modern format (4.5) zip64 file

Redirecting from stdin forces infozip's zip tool to create a zip64.

Expand Down