]> granicus.if.org Git - python/commitdiff
Hopeful fix for test_rglob_common on Windows without symlinks.
authorGuido van Rossum <guido@python.org>
Thu, 7 Jan 2016 21:12:34 +0000 (13:12 -0800)
committerGuido van Rossum <guido@python.org>
Thu, 7 Jan 2016 21:12:34 +0000 (13:12 -0800)
Lib/test/test_pathlib.py

index a12af225c8b4f1dbe2391c4d263c83fdd8d86e3b..6b3c70de94dba565bfeee5e9cd1c1f3d46f8f420 100644 (file)
@@ -1399,8 +1399,11 @@ class _BasePathTest(object):
         _check(it, ["fileA"])
         _check(p.rglob("fileB"), ["dirB/fileB"])
         _check(p.rglob("*/fileA"), [])
-        _check(p.rglob("*/fileB"), ["dirB/fileB", "dirB/linkD/fileB",
-                                    "linkB/fileB", "dirA/linkC/fileB"])
+        if symlink_skip_reason:
+            _check(p.rglob("*/fileB"), ["dirB/fileB"])
+        else:
+            _check(p.rglob("*/fileB"), ["dirB/fileB", "dirB/linkD/fileB",
+                                        "linkB/fileB", "dirA/linkC/fileB"])
         _check(p.rglob("file*"), ["fileA", "dirB/fileB",
                                   "dirC/fileC", "dirC/dirD/fileD"])
         p = P(BASE, "dirC")