mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
[3.9] bpo-41043: Escape literal part of the path for glob(). (GH-20994). (GH-21275)
(cherry picked from commit 9355868458
)
This commit is contained in:
parent
df59293bf0
commit
ecfecc2d6c
24 changed files with 40 additions and 30 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