cpython/Lib/test/test_pathlib
Barney Gale 49aaee7978
pathlib ABCs: restore relative_to() and is_relative_to() (#138853)
Restore `JoinablePath.[is_]relative_to()`, which were deleted in
ef63cca494. These methods are too useful to
forgo. Restore old tests, and add new tests covering path classes with
non-overridden `__eq__()` and `__hash__()`.

Slightly simplify `PurePath.relative_to()` while we're in the area.

No change to public APIs, because the pathlib ABCs are still private.
2025-10-10 19:08:55 +01:00
..
support GH-128520: pathlib ABCs: improve protocol for 'openable' objects (#134101) 2025-09-12 22:25:18 +01: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 pathlib ABCs: restore relative_to() and is_relative_to() (#138853) 2025-10-10 19:08:55 +01: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: add JoinablePath.__vfspath__() (#133437) 2025-05-12 19:00:36 +01:00
test_pathlib.py Use test.support.is_wasm32 flag for is_emscripten or is_wasi for generic checks (GH-136815) 2025-07-22 12:50:13 -07:00
test_read.py GH-128520: pathlib ABCs: improve protocol for 'openable' objects (#134101) 2025-09-12 22:25:18 +01:00
test_write.py GH-128520: pathlib ABCs: improve protocol for 'openable' objects (#134101) 2025-09-12 22:25:18 +01:00