0
0
mirror of https://github.com/python/cpython.git synced 2024-11-21 12:59:38 +01:00
cpython/Lib/test/test_pathlib
Barney Gale 266328552e
pathlib ABCs: tighten up resolve() and absolute() (#126611)
In `PathBase.resolve()`, raise `UnsupportedOperation` if a non-POSIX path
parser is used (our implementation uses `posixpath._realpath()`, which
produces incorrect results for non-POSIX path flavours.) Also tweak code to
call `self.absolute()` upfront rather than supplying an emulated `getcwd()`
function.

Adjust `PathBase.absolute()` to work somewhat like `resolve()`. If a POSIX
path parser is used, we treat the root directory as the current directory.
This is the simplest useful behaviour for concrete path types without a
current directory cursor.
2024-11-09 18:47:49 +00:00
..
__init__.py
test_pathlib_abc.py pathlib ABCs: tighten up resolve() and absolute() (#126611) 2024-11-09 18:47:49 +00:00
test_pathlib.py pathlib ABCs: tighten up resolve() and absolute() (#126611) 2024-11-09 18:47:49 +00:00