summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2022-09-26 19:21:41 -0400
committerNed Batchelder <ned@nedbatchelder.com>2022-09-26 20:27:16 -0400
commitfd36918609a18bd36a7e2c3b208220cf25c0957d (patch)
tree013019b92812c04882d85c83d334ecfae3dd6600 /tests
parent2c4bd7f1f9e8c3c429db2b9cfdc33ba0881f8fde (diff)
downloadpython-coveragepy-git-fd36918609a18bd36a7e2c3b208220cf25c0957d.tar.gz
fix: `class` statements shouldn't be branches. #1449
Revert "refactor: we no longer need to treat 'class' lines specially" This reverts commit 79f9f4575321fafc2ef770e3255f874db3d4b037.
Diffstat (limited to 'tests')
-rw-r--r--tests/test_lcov.py6
-rw-r--r--tests/test_parser.py6
2 files changed, 5 insertions, 7 deletions
diff --git a/tests/test_lcov.py b/tests/test_lcov.py
index 09bb99aa..ed7706fb 100644
--- a/tests/test_lcov.py
+++ b/tests/test_lcov.py
@@ -203,10 +203,8 @@ class LcovTest(CoverageTest):
DA:9,0,FPTWzd68bDx76HN7VHu1wA
LF:6
LH:4
- BRDA:0,0,0,1
- BRDA:7,0,1,1
- BRF:2
- BRH:2
+ BRF:0
+ BRH:0
end_of_record
""")
actual_result = self.get_lcov_report_content()
diff --git a/tests/test_parser.py b/tests/test_parser.py
index 48f5ade3..6d181c9e 100644
--- a/tests/test_parser.py
+++ b/tests/test_parser.py
@@ -43,7 +43,7 @@ class PythonParserTest(CoverageTest):
pass
""")
assert parser.exit_counts() == {
- 2:2, 3:1, 4:2, 5:1, 7:1, 9:2, 10:1
+ 2:1, 3:1, 4:2, 5:1, 7:1, 9:1, 10:1
}
def test_generator_exit_counts(self):
@@ -89,7 +89,7 @@ class PythonParserTest(CoverageTest):
pass
""")
assert parser.exit_counts() == {
- 1:1, 2:1, 3:1
+ 1:0, 2:1, 3:1
}
def test_missing_branch_to_excluded_code(self):
@@ -472,7 +472,7 @@ class ParserFileTest(CoverageTest):
class Bar:
pass
"""
- counts = { 2:2, 3:1, 4:2, 5:1, 7:1, 9:2, 10:1 }
+ counts = { 2:1, 3:1, 4:2, 5:1, 7:1, 9:1, 10:1 }
fname = slug + ".py"
self.make_file(fname, text, newline=newline)
parser = self.parse_file(fname)