]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
GH-113528: Speed up pathlib ABC tests. (#113788)
authorBarney Gale <barney.gale@gmail.com>
Mon, 8 Jan 2024 19:31:52 +0000 (19:31 +0000)
committerGitHub <noreply@github.com>
Mon, 8 Jan 2024 19:31:52 +0000 (19:31 +0000)
commitb3dba18eab96dc95653031863bb2a222af912f2b
tree99b47c48bba41f56492fdaa18a36ad478eaa12da
parentbc71ae2b97bb59b1796be056fb821d9abdee840b
GH-113528: Speed up pathlib ABC tests. (#113788)

- Add `__slots__` to dummy path classes.
- Return namedtuple rather than `os.stat_result` from `DummyPath.stat()`.
- Reduce maximum symlink count in `DummyPathWithSymlinks.resolve()`.
Lib/pathlib/_abc.py
Lib/test/test_pathlib/test_pathlib_abc.py