mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
bpo-41043: Escape literal part of the path for glob(). (GH-20994)
This commit is contained in:
parent
a041e116db
commit
9355868458
24 changed files with 37 additions and 31 deletions
|
|
@ -543,7 +543,7 @@ class StartupImportTests(unittest.TestCase):
|
|||
# found in sys.path (see site.addpackage()). Skip the test if at least
|
||||
# one .pth file is found.
|
||||
for path in isolated_paths:
|
||||
pth_files = glob.glob(os.path.join(path, "*.pth"))
|
||||
pth_files = glob.glob(os.path.join(glob.escape(path), "*.pth"))
|
||||
if pth_files:
|
||||
self.skipTest(f"found {len(pth_files)} .pth files in: {path}")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue