Version 4.1b3 — 2016-05-10
- When running your program, execution can jump from an
except X:
line to some other line when an exception other thanX
happens. This jump is no longer considered a branch when measuring branch coverage. - When measuring branch coverage,
yield
statements that were never resumed were incorrectly marked as missing, as reported in issue 440. This is now fixed. - During branch coverage of single-line callables like lambdas and generator expressions, coverage.py can now distinguish between them never being called, or being called but not completed. Fixes issue 90, issue 460 and issue 475.
- The HTML report now has a map of the file along the rightmost edge of the page, giving an overview of where the missed lines are. Thanks, Dmitry Shishov.
- The HTML report now uses different monospaced fonts, favoring Consolas over Courier. Along the way, issue 472 about not properly handling one-space indents was fixed. The index page also has slightly different styling, to try to make the clickable detail pages more apparent.
- Missing branches reported with
coverage report -m
will now say->exit
for missed branches to the exit of a function, rather than a negative number. Fixes issue 469. coverage --help
andcoverage --version
now mention which tracer is installed, to help diagnose problems. The docs mention which features need the C extension. (issue 479)- Officially support PyPy 5.1, which required no changes, just updates to the docs.
- The Coverage.report function had two parameters with non-None defaults, which have been changed. show_missing used to default to True, but now defaults to None. If you had been calling Coverage.report without specifying show_missing, you’ll need to explicitly set it to True to keep the same behavior. skip_covered used to default to False. It is now None, which doesn’t change the behavior. This fixes issue 485.
- It’s never been possible to pass a namespace module to one of the analysis functions, but now at least we raise a more specific error message, rather than getting confused. (issue 456)
- The coverage.process_startup function now returns the Coverage instance it creates, as suggested in issue 481.
- Make a small tweak to how we compare threads, to avoid buggy custom comparison code in thread classes. (issue 245)
➡️ PyPI page: coverage 4.1b3.
➡️ To install: python3 -m pip install coverage==4.1b3