8000 GH-77609: Add follow_symlinks argument to `pathlib.Path.glob()` by barneygale · Pull Request #102616 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

GH-77609: Add follow_symlinks argument to pathlib.Path.glob() #102616

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

Merged
merged 17 commits into from
May 29, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Simplify test diff slightly
  • Loading branch information
barneygale committed Mar 12, 2023
commit b6c019eebde58197e1028ce9749e3ab9282e5fe2
4 changes: 3 additions & 1 deletion Lib/test/test_pathlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -1760,9 +1760,11 @@ def _check(glob, expected):
_check(p.glob("dir*/file*"), ["dirB/fileB", "dirC/fileC"])
if not os_helper.can_symlink():
_check(p.glob("*A"), ['dirA', 'fileA'])
_check(p.glob("*B/*"), ['dirB/fileB'])
else:
_check(p.glob("*A"), ['dirA', 'fileA', 'linkA'])
if not os_helper.can_symlink():
_check(p.glob("*B/*"), ['dirB/fileB'])
else:
_check(p.glob("*B/*"), ['dirB/fileB', 'dirB/linkD'])
_check(p.glob("*/fileB"), ['dirB/fileB'])
_check(p.glob("*/"), ["dirA", "dirB", "dirC", "dirE"])
Expand Down
0