◐ Shell
clean mode source ↗

GH-103517: Improve tests for `pathlib.Path.walk()` by barneygale · Pull Request #103518 · python/cpython

Skip to content

Navigation Menu

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Conversation

@barneygale

Remove list index juggling from tests for pathlib.Path.walk(top_down=True) and walk(top_down=False), which makes them more readable.

We no longer check the order that sibling directories are visited in bottom-up mode. This order is arbitrary and cannot be controlled by the user.

@barneygale

zmievsa

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I love how you have rewritten them. Lack of indexes really does make them much more readable.

Sadly, I have no suggestions as I feel like your work here is complete as-is.

@barneygale

carljm added a commit to carljm/cpython that referenced this pull request

Apr 17, 2023

carljm added a commit to carljm/cpython that referenced this pull request

Apr 17, 2023

Labels