Skip to content

Commit

Permalink
test: json expectations should have explicit format number
Browse files Browse the repository at this point in the history
  • Loading branch information
nedbat committed Jul 11, 2024
1 parent 6b8fb11 commit 8b89764
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/test_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

import coverage
from coverage import Coverage
from coverage.jsonreport import FORMAT_VERSION

from tests.coveragetest import UsingModulesMixin, CoverageTest

Expand Down Expand Up @@ -88,7 +87,6 @@ def _compare_json_reports(
)
del (parsed_result['meta']['timestamp'])
expected_result["meta"].update({
"format": FORMAT_VERSION,
"version": coverage.__version__,
})
assert parsed_result == expected_result
Expand All @@ -98,6 +96,7 @@ def test_branch_coverage(self) -> None:
expected_result = {
'meta': {
"branch_coverage": True,
"format": 2,
"show_contexts": False,
},
'files': {
Expand Down Expand Up @@ -149,6 +148,7 @@ def test_simple_line_coverage(self) -> None:
expected_result = {
'meta': {
"branch_coverage": False,
"format": 2,
"show_contexts": False,
},
'files': {
Expand Down Expand Up @@ -182,6 +182,7 @@ def test_regions_coverage(self) -> None:
expected_result = {
"meta": {
"branch_coverage": False,
"format": 2,
"show_contexts": False,
},
"files": {
Expand Down Expand Up @@ -295,6 +296,7 @@ def run_context_test(self, relative_files: bool) -> None:
expected_result = {
'meta': {
"branch_coverage": False,
"format": 2,
"show_contexts": True,
},
'files': {
Expand Down

0 comments on commit 8b89764

Please sign in to comment.