Skip to content

Conversation

@Ryuta1005
Copy link
Contributor

Summary

This PR extends the JSON report output by adding dedicated fields for Statement Coverage and Branch Coverage.
These fields are included in both per-file summary objects and the top-level totals object when branch coverage is enabled.

Changes

  • Added new summary fields:
    • percent_statements_covered
    • percent_statements_covered_display
    • percent_branches_covered
    • percent_branches_covered_display
  • No changes were made to the underlying coverage calculation logic (this PR affects reporting only).

Related Issue / Context

@nedbat nedbat force-pushed the feature/jsonreport-branches-metrics branch from 6d35987 to a5d6d96 Compare November 18, 2025 10:32
@nedbat nedbat merged commit 557dd15 into coveragepy:main Nov 18, 2025
44 checks passed
@nedbat
Copy link
Member

nedbat commented Nov 18, 2025

This is now released as part of coverage 7.12.0.

@Ryuta1005
Copy link
Contributor Author

Thanks so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants