We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dd32d2e commit 3e3de7fCopy full SHA for 3e3de7f
python_files/tests/unittestadapter/test_coverage.py
@@ -97,3 +97,10 @@ def test_basic_django_coverage(manage_py_file):
97
assert polls_views_coverage.get("lines_missed") is not None
98
assert set(polls_views_coverage.get("lines_covered")) == {3, 4, 6}
99
assert set(polls_views_coverage.get("lines_missed")) == {7}
100
+
101
+ model_cov = results.get(str(data_path / "polls" / "models.py"))
102
+ coverage_version = Version(coverage.__version__)
103
+ # only include check for branches if the version is >= 7.7.0
104
+ if coverage_version >= Version("7.7.0"):
105
+ assert model_cov.get("executed_branches") == 1
106
+ assert model_cov.get("total_branches") == 2
0 commit comments