summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_pathlib.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2019-10-21 17:37:15 (GMT)
committerGitHub <noreply@github.com>2019-10-21 17:37:15 (GMT)
commit10ecbadb799ddf3393d1fc80119a3db14724d381 (patch)
treecc60337c59e1c2e32a7f1564e68faf02cb8ececc /Lib/test/test_pathlib.py
parent1e73945470644202262e1ddee2b49e2708a29794 (diff)
downloadcpython-10ecbadb799ddf3393d1fc80119a3db14724d381.zip
cpython-10ecbadb799ddf3393d1fc80119a3db14724d381.tar.gz
cpython-10ecbadb799ddf3393d1fc80119a3db14724d381.tar.bz2
bpo-31202: Preserve case of literal parts in Path.glob() on Windows. (GH-16860)
Diffstat (limited to 'Lib/test/test_pathlib.py')
-rw-r--r--Lib/test/test_pathlib.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_pathlib.py b/Lib/test/test_pathlib.py
index f3304f0..221c272 100644
--- a/Lib/test/test_pathlib.py
+++ b/Lib/test/test_pathlib.py
@@ -2378,11 +2378,15 @@ class WindowsPathTest(_BasePathTest, unittest.TestCase):
P = self.cls
p = P(BASE)
self.assertEqual(set(p.glob("FILEa")), { P(BASE, "fileA") })
+ self.assertEqual(set(p.glob("F*a")), { P(BASE, "fileA") })
+ self.assertEqual(set(map(str, p.glob("FILEa"))), {f"{p}\\FILEa"})
+ self.assertEqual(set(map(str, p.glob("F*a"))), {f"{p}\\fileA"})
def test_rglob(self):
P = self.cls
p = P(BASE, "dirC")
self.assertEqual(set(p.rglob("FILEd")), { P(BASE, "dirC/dirD/fileD") })
+ self.assertEqual(set(map(str, p.rglob("FILEd"))), {f"{p}\\dirD\\FILEd"})
def test_expanduser(self):
P = self.cls