summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_pathlib/test_pathlib.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_pathlib/test_pathlib.py')
-rw-r--r--Lib/test/test_pathlib/test_pathlib.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/Lib/test/test_pathlib/test_pathlib.py b/Lib/test/test_pathlib/test_pathlib.py
index 2b16645..c0dcf31 100644
--- a/Lib/test/test_pathlib/test_pathlib.py
+++ b/Lib/test/test_pathlib/test_pathlib.py
@@ -1250,6 +1250,19 @@ class PathTest(test_pathlib_abc.DummyPathTest, PurePathTest):
self.assertEqual(expect, set(p.glob(P(pattern))))
self.assertEqual(expect, set(p.glob(FakePath(pattern))))
+ @needs_symlinks
+ def test_glob_dot(self):
+ P = self.cls
+ with os_helper.change_cwd(P(self.base, "dirC")):
+ self.assertEqual(
+ set(P('.').glob('*')), {P("fileC"), P("novel.txt"), P("dirD")})
+ self.assertEqual(
+ set(P('.').glob('**')), {P("fileC"), P("novel.txt"), P("dirD"), P("dirD/fileD"), P(".")})
+ self.assertEqual(
+ set(P('.').glob('**/*')), {P("fileC"), P("novel.txt"), P("dirD"), P("dirD/fileD")})
+ self.assertEqual(
+ set(P('.').glob('**/*/*')), {P("dirD/fileD")})
+
def test_rglob_pathlike(self):
P = self.cls
p = P(self.base, "dirC")