summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_pathlib.py
diff options
context:
space:
mode:
authorBarney Gale <barney.gale@gmail.com>2023-05-03 16:28:44 (GMT)
committerGitHub <noreply@github.com>2023-05-03 16:28:44 (GMT)
commitda1980afcb8820ffaa0574df735bc39b1a276a76 (patch)
tree00a099acf5f616cbcae3646256d3b3cb977830b9 /Lib/test/test_pathlib.py
parent38dc3f28dde92b4fa6284a57f4e554991a3d9276 (diff)
downloadcpython-da1980afcb8820ffaa0574df735bc39b1a276a76.zip
cpython-da1980afcb8820ffaa0574df735bc39b1a276a76.tar.gz
cpython-da1980afcb8820ffaa0574df735bc39b1a276a76.tar.bz2
GH-104114: Fix `pathlib.WindowsPath.glob()` use of literal pattern segment case (GH-104116)
We now use `_WildcardSelector` to evaluate literal pattern segments, which allows us to retrieve the real filesystem case. This change is necessary in order to implement a *case_sensitive* argument (see GH-81079) and a *follow_symlinks* argument (see GH-77609).
Diffstat (limited to 'Lib/test/test_pathlib.py')
-rw-r--r--Lib/test/test_pathlib.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_pathlib.py b/Lib/test/test_pathlib.py
index 620d480..424bb92 100644
--- a/Lib/test/test_pathlib.py
+++ b/Lib/test/test_pathlib.py
@@ -3122,7 +3122,7 @@ class WindowsPathTest(_BasePathTest, unittest.TestCase):
self.assertEqual(set(p.glob("FILEa")), { P(BASE, "fileA") })
self.assertEqual(set(p.glob("*a\\")), { P(BASE, "dirA") })
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("FILEa"))), {f"{p}\\fileA"})
self.assertEqual(set(map(str, p.glob("F*a"))), {f"{p}\\fileA"})
def test_rglob(self):
@@ -3130,7 +3130,7 @@ class WindowsPathTest(_BasePathTest, unittest.TestCase):
p = P(BASE, "dirC")
self.assertEqual(set(p.rglob("FILEd")), { P(BASE, "dirC/dirD/fileD") })
self.assertEqual(set(p.rglob("*\\")), { P(BASE, "dirC/dirD") })
- self.assertEqual(set(map(str, p.rglob("FILEd"))), {f"{p}\\dirD\\FILEd"})
+ self.assertEqual(set(map(str, p.rglob("FILEd"))), {f"{p}\\dirD\\fileD"})
def test_expanduser(self):
P = self.cls