-
-
Notifications
You must be signed in to change notification settings - Fork 30.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tests for pathlib.Path.walk()
are a little fragile
#103517
Labels
Comments
barneygale
added
type-bug
An unexpected behavior, bug, or error
tests
Tests in the Lib/test dir
topic-pathlib
labels
Apr 13, 2023
barneygale
added a commit
to barneygale/cpython
that referenced
this issue
Apr 13, 2023
barneygale
added a commit
that referenced
this issue
Apr 15, 2023
carljm
added a commit
to carljm/cpython
that referenced
this issue
Apr 17, 2023
* main: Remove `expert-*` from `project-updater` GH workflow (python#103579) pythongh-103583: Add codecs and maps to _codecs_* module state (python#103540) pythongh-48330: address review comments to PR-12271 (python#103209) pythongh-103527: Add multibytecodec.h as make dep for _codecs_* (python#103567) pythongh-103553: Improve `test_inspect`: add more assertions, remove unused (python#103554) pythonGH-103517: Improve tests for `pathlib.Path.walk()` (pythonGH-103518) pythongh-102114: Make dis print more concise tracebacks for syntax errors in str inputs (python#102115) pythonGH-78079: Fix UNC device path root normalization in pathlib (pythonGH-102003) pythongh-101517: Add regression test for a lineno bug in try/except* impacting pdb (python#103547) pythongh-103527: Add make deps for _codecs_* and _multibytecodec (python#103528) pythongh-103532: Fix reST syntax in NEWS entry (pythonGH-103544) pythongh-103532: Add NEWS entry (python#103542)
carljm
added a commit
to carljm/cpython
that referenced
this issue
Apr 17, 2023
* superopt: update generated cases with new comment review comments Remove `expert-*` from `project-updater` GH workflow (python#103579) pythongh-103583: Add codecs and maps to _codecs_* module state (python#103540) pythongh-48330: address review comments to PR-12271 (python#103209) pythongh-103527: Add multibytecodec.h as make dep for _codecs_* (python#103567) pythongh-103553: Improve `test_inspect`: add more assertions, remove unused (python#103554) pythonGH-103517: Improve tests for `pathlib.Path.walk()` (pythonGH-103518) pythongh-102114: Make dis print more concise tracebacks for syntax errors in str inputs (python#102115) pythonGH-78079: Fix UNC device path root normalization in pathlib (pythonGH-102003) pythongh-101517: Add regression test for a lineno bug in try/except* impacting pdb (python#103547) pythongh-103527: Add make deps for _codecs_* and _multibytecodec (python#103528) pythongh-103532: Fix reST syntax in NEWS entry (pythonGH-103544) pythongh-103532: Add NEWS entry (python#103542)
Resolved by #103518. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
test_walk_topdown()
attempts to handle all possible visitation orders, but the result is difficult to read. We can enforce a specific order by sortingdirnames
.cpython/Lib/test/test_pathlib.py
Lines 2680 to 2694 in a6f9594
test_walk_bottom_up()
suffers similar problems, and also makes unjustified assertions about the order that siblings are visited (which is arbitrary and cannot be influenced by the user, contrary to top-down mode). It can be simplified to ensure that children are yielded before parents.cpython/Lib/test/test_pathlib.py
Lines 2717 to 2735 in a6f9594
Linked PRs
pathlib.Path.walk()
#103518The text was updated successfully, but these errors were encountered: