diff --git a/coverage/jsonreport.py b/coverage/jsonreport.py index 7ca468e32..3afae2ccd 100644 --- a/coverage/jsonreport.py +++ b/coverage/jsonreport.py @@ -115,4 +115,4 @@ def _convert_branch_arcs(branch_arcs): """Convert branch arcs to a list of two-element tuples.""" for source, targets in branch_arcs.items(): for target in targets: - yield source, target if target != -1 else 0 + yield source, target diff --git a/tests/test_json.py b/tests/test_json.py index 7205c284c..9bb69bf25 100644 --- a/tests/test_json.py +++ b/tests/test_json.py @@ -55,7 +55,7 @@ def test_branch_coverage(self): 'executed_branches': [ [2, 4], [4, 5], - [8, 0], + [8, -1], ], 'missing_branches': [ [2, 3],