mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59: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
|
@ -1605,7 +1605,7 @@ class TestRoundtrip(TestCase):
|
|||
import glob, random
|
||||
fn = support.findfile("tokenize_tests.txt")
|
||||
tempdir = os.path.dirname(fn) or os.curdir
|
||||
testfiles = glob.glob(os.path.join(tempdir, "test*.py"))
|
||||
testfiles = glob.glob(os.path.join(glob.escape(tempdir), "test*.py"))
|
||||
|
||||
# Tokenize is broken on test_pep3131.py because regular expressions are
|
||||
# broken on the obscure unicode identifiers in it. *sigh*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue