summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_pathlib.py
diff options
context:
space:
mode:
authorBrett Cannon <brett@python.org>2013-11-22 21:14:10 (GMT)
committerBrett Cannon <brett@python.org>2013-11-22 21:14:10 (GMT)
commitfe77f4ebb554bf40b5c1810aeddc2c240aaef431 (patch)
treeed1f0b15beb7ca3f9ffdbd0792538bb35fb2c7b6 /Lib/test/test_pathlib.py
parentaa407758176affde0c81301e3c8856dd73e6b1c3 (diff)
downloadcpython-fe77f4ebb554bf40b5c1810aeddc2c240aaef431.zip
cpython-fe77f4ebb554bf40b5c1810aeddc2c240aaef431.tar.gz
cpython-fe77f4ebb554bf40b5c1810aeddc2c240aaef431.tar.bz2
Issue #19718: Add a case-insensitive FS check to test.support to use
in test_pathlib. Purposefully designed to work from a specified directory in case multiple file systems are used on the system.
Diffstat (limited to 'Lib/test/test_pathlib.py')
-rwxr-xr-xLib/test/test_pathlib.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/Lib/test/test_pathlib.py b/Lib/test/test_pathlib.py
index e23e5a7..751764f 100755
--- a/Lib/test/test_pathlib.py
+++ b/Lib/test/test_pathlib.py
@@ -1623,12 +1623,16 @@ class PosixPathTest(_BasePathTest, unittest.TestCase):
def test_glob(self):
P = self.cls
p = P(BASE)
- self.assertEqual(set(p.glob("FILEa")), set())
+ given = set(p.glob("FILEa"))
+ expect = set() if not support.fs_is_case_insensitive(BASE) else given
+ self.assertEqual(given, expect)
def test_rglob(self):
P = self.cls
p = P(BASE, "dirC")
- self.assertEqual(set(p.rglob("FILEd")), set())
+ given = set(p.rglob("FILEd"))
+ expect = set() if not support.fs_is_case_insensitive(BASE) else given
+ self.assertEqual(given, expect)
@only_nt