]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
pathlib tests: create `walk()` test hierarchy without using class under test (#128338)
authorBarney Gale <barney.gale@gmail.com>
Sat, 4 Jan 2025 15:45:24 +0000 (15:45 +0000)
committerGitHub <noreply@github.com>
Sat, 4 Jan 2025 15:45:24 +0000 (15:45 +0000)
commitfd94c6a8032676d0659aa9e38cdaa7c17093119c
tree099239f9f06ac55d67e8cab49d8fa175305dacb7
parenta0088b40bb212dc132e147d04f9287cabd72d163
pathlib tests: create `walk()` test hierarchy without using class under test (#128338)

In the tests for `pathlib.Path.walk()`, avoid using the path class under
test (`self.cls`) in test setup. Instead we use `os` functions in
`test_pathlib`, and direct manipulation of `DummyPath` internal data in
`test_pathlib_abc`.
Lib/test/test_pathlib/test_pathlib.py
Lib/test/test_pathlib/test_pathlib_abc.py