mirror of
https://github.com/python/cpython.git
synced 2025-10-17 12:18:23 +00:00
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:
parent
aa40775817
commit
fe77f4ebb5
2 changed files with 21 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue