summaryrefslogtreecommitdiff
path: root/tests/test_parser.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2021-10-28 06:59:03 -0400
committerNed Batchelder <ned@nedbatchelder.com>2021-10-28 06:59:03 -0400
commit81a55d102550b4535191756960f6846083fc7e30 (patch)
tree0f61064078496ac483e5d03b23800e2f1b95513a /tests/test_parser.py
parente36475a387b734711fbbe84c0fe4b6d0777cd9ec (diff)
downloadpython-coveragepy-git-81a55d102550b4535191756960f6846083fc7e30.tar.gz
refactor(test): make re_lines (et al) look like re.search
and also replace some calls with just-plain re.search.
Diffstat (limited to 'tests/test_parser.py')
-rw-r--r--tests/test_parser.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test_parser.py b/tests/test_parser.py
index 3197ffb4..48963358 100644
--- a/tests/test_parser.py
+++ b/tests/test_parser.py
@@ -502,5 +502,5 @@ def test_ast_dump():
assert result[0] == "<Module"
assert result[-1] == ">"
result_text = "\n".join(result)
- assert len(re_lines(result_text, r"^\s+>")) > num_lines
- assert len(re_lines(result_text, r"<Name @ \d+,\d+(:\d+)? id: '\w+'>")) > num_lines // 2
+ assert len(re_lines(r"^\s+>", result_text)) > num_lines
+ assert len(re_lines(r"<Name @ \d+,\d+(:\d+)? id: '\w+'>", result_text)) > num_lines // 2