Sourced from coverage's changelog.
Version 7.7.0 — 2025-03-16
The Coverage object has a new method, :meth:
.Coverage.branch_statsfor getting simple branch information for a module. Closesissue 1888_.The :class:
Coverage constructor<.Coverage>now has apluginsparameter for passing in plugin objects directly, thanks toAlex Gaynor <pull 1919_>_.Many constant tests in if statements are now recognized as being optimized away. For example, previously
if 13:would have been considered a branch with one path not taken. Now it is understood as always true and no coverage is missing.The experimental sys.monitoring support now works for branch coverage if you are using Python 3.14.0 alpha 6 or newer. This should reduce the overhead coverage.py imposes on your test suite. Set the environment variable
COVERAGE_CORE=sysmonto try it out.Confirmed support for PyPy 3.11. Thanks Michał Górny.
.. _issue 1888: nedbat/coveragepy#1888 .. _pull 1919: nedbat/coveragepy#1919
.. _changes_7-6-12:
61dcf71
docs: sample HTML for 7.7.035a31c5
docs: prep for 7.7.08f6e006
docs: edit the changelog33f12df
feat: Coverage.branch_stats() #1888c4919cb
lint: somehow these snuck through7e9f2f2
perf(sysmon): silly mistake1e99d28
perf(sysmon): improve speedc9908d7
test: benchmark improvements0973f44
chore: bump the action-dependencies group with 2 updates (#1935)824b3ba
style: fix one change from updated pylint