Skip to content

Commit 161f850

Browse files
committed
Hopeful fix for test_rglob_common on Windows without symlinks.
1 parent e4d1be1 commit 161f850

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Lib/test/test_pathlib.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1399,8 +1399,11 @@ def _check(glob, expected):
13991399
_check(it, ["fileA"])
14001400
_check(p.rglob("fileB"), ["dirB/fileB"])
14011401
_check(p.rglob("*/fileA"), [])
1402-
_check(p.rglob("*/fileB"), ["dirB/fileB", "dirB/linkD/fileB",
1403-
"linkB/fileB", "dirA/linkC/fileB"])
1402+
if symlink_skip_reason:
1403+
_check(p.rglob("*/fileB"), ["dirB/fileB"])
1404+
else:
1405+
_check(p.rglob("*/fileB"), ["dirB/fileB", "dirB/linkD/fileB",
1406+
"linkB/fileB", "dirA/linkC/fileB"])
14041407
_check(p.rglob("file*"), ["fileA", "dirB/fileB",
14051408
"dirC/fileC", "dirC/dirD/fileD"])
14061409
p = P(BASE, "dirC")

0 commit comments

Comments
 (0)