summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2021-11-11 06:54:06 -0500
committerNed Batchelder <ned@nedbatchelder.com>2021-11-11 06:54:06 -0500
commit79f9f4575321fafc2ef770e3255f874db3d4b037 (patch)
tree55585f53e63083145add45c9779d3124ec171566 /tests
parent0387bbaa5e9ab2ad834311249802695ebb0c34ca (diff)
downloadpython-coveragepy-git-79f9f4575321fafc2ef770e3255f874db3d4b037.tar.gz
refactor: we no longer need to treat 'class' lines specially
Originally, this tokenizing code was paired with bytecode analysis. But now we use AST instead, so class lines don't need to be handled differently.
Diffstat (limited to 'tests')
-rw-r--r--tests/test_parser.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test_parser.py b/tests/test_parser.py
index 303f2b55..538e2500 100644
--- a/tests/test_parser.py
+++ b/tests/test_parser.py
@@ -43,7 +43,7 @@ class PythonParserTest(CoverageTest):
pass
""")
assert parser.exit_counts() == {
- 2:1, 3:1, 4:2, 5:1, 7:1, 9:1, 10:1
+ 2:2, 3:1, 4:2, 5:1, 7:1, 9:2, 10:1
}
def test_generator_exit_counts(self):
@@ -89,7 +89,7 @@ class PythonParserTest(CoverageTest):
pass
""")
assert parser.exit_counts() == {
- 1:0, 2:1, 3:1
+ 1:1, 2:1, 3:1
}
def test_missing_branch_to_excluded_code(self):
@@ -457,7 +457,7 @@ class ParserFileTest(CoverageTest):
class Bar:
pass
"""
- counts = { 2:1, 3:1, 4:2, 5:1, 7:1, 9:1, 10:1 }
+ counts = { 2:2, 3:1, 4:2, 5:1, 7:1, 9:2, 10:1 }
name_endings = (("unix", "\n"), ("dos", "\r\n"), ("mac", "\r"))
for fname, newline in name_endings:
fname = fname + ".py"