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.
This commit is contained in:
Brett Cannon 2013-11-22 16:14:10 -05:00
parent aa40775817
commit fe77f4ebb5
2 changed files with 21 additions and 3 deletions

View file

@ -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