Skip to content

Commit bcbabb3

Browse files
sobolevnaisk
authored andcommitted
pythongh-108303: Move zip and tar archives to Lib/test/archivetestdata (python#111549)
1 parent fe3f358 commit bcbabb3

14 files changed

+24
-23
lines changed

Lib/test/ziptestdata/README.md renamed to Lib/test/archivetestdata/README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,31 @@
1-
# Test data for `test_zipfile`
1+
# Test data for `test_zipfile`, `test_tarfile` (and even some others)
22

3-
The test executables in this directory are created manually from header.sh and
3+
## `test_zipfile`
4+
5+
The test executables in this directory are created manually from `header.sh` and
46
the `testdata_module_inside_zip.py` file. You must have Info-ZIP's zip utility
57
installed (`apt install zip` on Debian).
68

7-
## Purpose
9+
### Purpose of `exe_with_zip` and `exe_with_z64`
810

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

13-
## Updating the test executables
15+
### Updating the test executables
1416

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

18-
### Standard old format (2.0) zip file
20+
#### Standard old format (2.0) zip file
1921

2022
```
2123
zip -0 zip2.zip testdata_module_inside_zip.py
2224
cat header.sh zip2.zip >exe_with_zip
2325
rm zip2.zip
2426
```
2527

26-
### Modern format (4.5) zip64 file
28+
#### Modern format (4.5) zip64 file
2729

2830
Redirecting from stdin forces Info-ZIP's zip tool to create a zip64.
2931

@@ -32,4 +34,3 @@ zip -0 <testdata_module_inside_zip.py >zip64.zip
3234
cat header.sh zip64.zip >exe_with_z64
3335
rm zip64.zip
3436
```
35-
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)