cpython/Lib/test/test_pathlib
Barney Gale cf9d1a4b6b
GH-128520: pathlib ABCs: allow tests to be run externally (#131315)
Adjust the tests for the `pathlib.types` module so that they can be run
against the `pathlib-abc` PyPI package, which is a backport of the module
for older Python versions.

Specifically, we add a `.support.is_pypi` switch that is false in the
stdlib and true in the pathlib-abc package. This controls which package
we import, and whether or not we run tests against `PurePath` and `Path`.

For compatibility with older Python versions, we stop using
`zipfile.ZipFile.mkdir()` and `zipfile.ZipInfo._for_archive()`.
2025-03-21 22:18:20 +00:00
..
support GH-128520: pathlib ABCs: allow tests to be run externally (#131315) 2025-03-21 22:18:20 +00:00
__init__.py
test_copy.py GH-128520: pathlib ABCs: allow tests to be run externally (#131315) 2025-03-21 22:18:20 +00:00
test_join.py GH-128520: pathlib ABCs: allow tests to be run externally (#131315) 2025-03-21 22:18:20 +00:00
test_join_posix.py GH-128520: pathlib ABCs: allow tests to be run externally (#131315) 2025-03-21 22:18:20 +00:00
test_join_windows.py GH-128520: pathlib ABCs: allow tests to be run externally (#131315) 2025-03-21 22:18:20 +00:00
test_pathlib.py GH-123599: Deprecate duplicate pathname2url() implementation (#127380) 2025-03-20 00:54:36 +00:00
test_read.py GH-128520: pathlib ABCs: allow tests to be run externally (#131315) 2025-03-21 22:18:20 +00:00
test_write.py GH-128520: pathlib ABCs: allow tests to be run externally (#131315) 2025-03-21 22:18:20 +00:00