Coverage

Latest version: v7.7.1

Safety actively analyzes 721794 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 12

7.6.8

--------------------------

- Fix: the LCOV report code assumed that a branch line that took no branches
meant that the entire line was unexecuted. This isn't true in a few cases:
the line might always raise an exception, or might have been optimized away.
Fixes `issue 1896`_.

- Fix: similarly, the HTML report will now explain that a line that jumps to
none of its expected destinations must have always raised an exception.
Previously, it would say something nonsensical like, "line 4 didn't jump to
line 5 because line 4 was never true, and it didn't jump to line 7 because
line 4 was always true." This was also shown in `issue 1896`_.

.. _issue 1896: https://github.com/nedbat/coveragepy/issues/1896


.. _changes_7-6-7:

7.6.7

--------------------------

- Fix: ugh, the other assert from 7.6.5 can also be encountered in the wild,
so it's been restored to a conditional. Sorry for the churn.


.. _changes_7-6-6:

7.6.6

--------------------------

- One of the new asserts from 7.6.5 caused problems in real projects, as
reported in `issue 1891`_. The assert has been removed.

.. _issue 1891: https://github.com/nedbat/coveragepy/issues/1891


.. _changes_7-6-5:

7.6.5

--------------------------

- Fix: fine-tuned the exact Python version (3.12.6) when exiting from ``with``
statements changed how they traced. This affected whether people saw the
fix for `issue 1880`_.

- Fix: isolate our code more from mocking in the os module that in rare cases
can cause `bizarre behavior <pytest-cov-666_>`_.

- Refactor: some code unreachable code paths in parser.py were changed to
asserts. If you encounter any of these, please let me know!

.. _pytest-cov-666: https://github.com/pytest-dev/pytest-cov/issues/666


.. _changes_7-6-4:

7.6.4

--------------------------

- Fix: multi-line ``with`` statements could cause contained branches to be
incorrectly marked as missing (`issue 1880`_). This is now fixed.

.. _issue 1880: https://github.com/nedbat/coveragepy/issues/1880


.. _changes_7-6-3:

7.6.3

--------------------------

- Fix: nested context managers could incorrectly be analyzed to flag a missing
branch on the last context manager, as described in `issue 1876`_. This is
now fixed.

- Fix: the missing branch message about not exiting a module had an extra
"didn't," as described in `issue 1873`_. This is now fixed.

.. _issue 1873: https://github.com/nedbat/coveragepy/issues/1873
.. _issue 1876: https://github.com/nedbat/coveragepy/issues/1876


.. _changes_7-6-2:

Page 2 of 12

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.