summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2022-12-23 08:23:03 -0500
committerNed Batchelder <ned@nedbatchelder.com>2022-12-23 08:23:03 -0500
commit152cdc7a2b654b16fb572856d03097580e06e127 (patch)
tree1cfda3fea3b616adb7528d30621ffcad4382f2c1 /tests
parent31513b4b0559fdc7578aa1a30e048b928dc46188 (diff)
downloadpython-coveragepy-git-152cdc7a2b654b16fb572856d03097580e06e127.tar.gz
fix: don't forbid plus signs in file names. #1513
Diffstat (limited to 'tests')
-rw-r--r--tests/test_files.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/test_files.py b/tests/test_files.py
index 9e49628d..29bd9a0d 100644
--- a/tests/test_files.py
+++ b/tests/test_files.py
@@ -230,10 +230,18 @@ def globs_to_regex_params(
matches=["foo", "hello/foo", "hi/there/foo"],
nomatches=["foob", "hello/foob", "hello/Foo"],
),
+ globs_to_regex_params(
+ ["a+b/foo*", "x{y}z/foo*"],
+ matches=["a+b/foo", "a+b/foobar", "x{y}z/foobar"],
+ nomatches=["aab/foo", "ab/foo", "xyz/foo"],
+ ),
]))
)
def test_globs_to_regex(patterns, case_insensitive, partial, text, result):
regex = globs_to_regex(patterns, case_insensitive=case_insensitive, partial=partial)
+ print(patterns)
+ print(regex)
+ print(text)
assert bool(regex.match(text)) == result
@@ -243,8 +251,6 @@ def test_globs_to_regex(patterns, case_insensitive, partial, text, result):
("*****/foo.py", "*****"),
("Hello]there", "]"),
("Hello[there", "["),
- ("Hello+there", "+"),
- ("{a,b}c", "{"),
("x/a**/b.py", "a**"),
("x/abcd**/b.py", "abcd**"),
("x/**a/b.py", "**a"),