NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #125 most downloaded on PyPI
Code coverage measurement for Python
Last release 4 days ago
13 Sep 2026
Ships fairly regularly
a new release about every 3 weeks
Nearly every release is documented
notes for 59 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
17 years old
196 releases · first in 2009
Fix: setting COVERAGE_CORE=sysmon no longer errors on 3.11 and lower, thanks Hugo van Kemenade. It now issues a warning that sys.monitoring is not ava
COVERAGE_CORE=sysmon no longer errors on 3.11 and lower, thanks Hugo van Kemenade. It now issues a warning that sys.monitoring is not available and falls back to the default core instead.:arrow_right: PyPI page: coverage 7.4.2.
:arrow_right: To install: python3 -m pip install coverage==7.4.2
Fix: setting COVERAGE_CORE=sysmon no longer errors on 3.11 and lower, thanks Hugo van Kemenade. It now issues a warning that sys.monitoring is not available and falls back to the default core instead.
One column per quarter.
Fix: the JSON report now includes an explicit format version number, closing issue 1732.
:arrow_right: PyPI page: coverage 7.4.1.
:arrow_right: To install: python3 -m pip install coverage==7.4.1
Python 3.13.0a3 is supported.
Fix: the JSON report now includes an explicit format version number, closing issue 1732.
In Python 3.12 and above, you can try an experimental core based on the new module by defining a COVERAGE_CORE=sysmon environment variable. This shoul
COVERAGE_CORE=sysmon environment variable. This should be faster for line coverage, but not for branch coverage, and plugins and dynamic contexts are not yet supported with it. I am very interested to hear how it works (or doesn’t!) for you.:arrow_right: PyPI page: coverage 7.4.0.
:arrow_right: To install: python3 -m pip install coverage==7.4.0
In Python 3.12 and above, you can try an experimental core based on the new sys.monitoring module by defining a COVERAGE_CORE=sysmon environment variable. This should be faster for line coverage, but not for branch coverage, and plugins and dynamic contexts are not yet supported with it. I am very interested to hear how it works (or doesn't!) for you.
Fix: the change for multi-line signature exclusions in 7.3.3 broke other forms of nested clauses being excluded properly. This is now fixed, closing i
:arrow_right: PyPI page: coverage 7.3.4.
:arrow_right: To install: python3 -m pip install coverage==7.3.4
Fix: the change for multi-line signature exclusions in 7.3.3 broke other forms of nested clauses being excluded properly. This is now fixed, closing issue 1713.
Fix: in the HTML report, selecting code for copying won't select the line numbers also. Thanks, Robert Harris.
Fix: function definitions with multi-line signatures can now be excluded by matching any of the lines, closing issue 684. Thanks, Jan Rusak, Maciej Ko
file1.py and file001.py. Fixes issue 1709.coverage annotate command used to announce that it would be removed in a future version. Enough people got in touch to say that they use it, so it will stay. Don’t expect it to keep up with other new features though.pytest writes the pytest test name into the debug output.dataop2 writes the full data being added to CoverageData objects.:arrow_right: PyPI page: coverage 7.3.3.
:arrow_right: To install: python3 -m pip install coverage==7.3.3
The coverage lcov command ignored the [report] exclude_lines and [report] exclude_also settings (issue 1684). This is now fixed, thanks Jacqueline Lee
coverage lcov command ignored the [report] exclude_lines and [report] exclude_also settings (issue 1684). This is now fixed, thanks Jacqueline Lee.type is properly bolded in HTML reports.:arrow_right: PyPI page: coverage 7.3.2.
:arrow_right: To install: python3 -m pip install coverage==7.3.2
The semantics of stars in file patterns has been clarified in the docs. A leading or trailing star matches any number of path components, like a doubl
:arrow_right: PyPI page: coverage 7.3.1.
:arrow_right: To install: python3 -m pip install coverage==7.3.1
Added a Coverage.collect() context manager to start and stop coverage data collection.
Safety level may not be changed inside a transaction. This is now avoided, closing issue 1646. Thanks to Michael Bell for the detailed bug report.nosemgrep comments to our JavaScript code so that semgrep-based SAST security checks won’t raise false alarms about security problems that aren’t problems.:arrow_right: PyPI page: coverage 7.3.0.
:arrow_right: To install: python3 -m pip install coverage==7.3.0
Fix: reverted a change from 6.4.3 that helped Cython, but also increased the size of data files when using dynamic contexts, as described in the now-f
:arrow_right: PyPI page: coverage 7.2.7.
:arrow_right: To install: python3 -m pip install coverage==7.2.7
Fix: reverted a change from 6.4.3 that helped Cython, but also increased the size of data files when using dynamic contexts, as described in the now-fixed issue 1586. The problem is now avoided due to a recent change (issue 1538). Thanks to Anders Kaseorg and David Szotten for persisting with problem reports and detailed diagnoses.
Wheels are now provided for CPython 3.12.
Fix: the lcov command could raise an IndexError exception if a file is translated to Python but then executed under its own name. Jinja2 does this whe
lcov command could raise an IndexError exception if a file is translated to Python but then executed under its own name. Jinja2 does this when rendering templates. Fixes issue 1553.coverage debug sys command includes some environment variables in its output. This could have included sensitive data. Those values are now hidden with asterisks, closing issue 1628.:arrow_right: PyPI page: coverage 7.2.6.
:arrow_right: To install: python3 -m pip install coverage==7.2.6
Fix: html_report() could fail with an AttributeError on isatty if run in an unusual environment where sys.stdout had been replaced. This is now fixed.
html_report() could fail with an AttributeError on isatty if run in an unusual environment where sys.stdout had been replaced. This is now fixed.:arrow_right: PyPI page: coverage 7.2.5.
:arrow_right: To install: python3 -m pip install coverage==7.2.5
Fix: html_report() could fail with an AttributeError on isatty if run in an unusual environment where sys.stdout had been replaced. This is now fixed.
Fix: with relative_files = true, specifying a specific file to include or omit wouldn’t work correctly (issue 1604). This is now fixed, with testing h
PyCon 2023 sprint fixes!
relative_files = true, specifying a specific file to include or omit wouldn’t work correctly (issue 1604). This is now fixed, with testing help by Marc Gibbons.<source> element when using relative files and the source option ended with a slash (issue 1541). This is now fixed, thanks to Kevin Brown-Silva.:arrow_right: PyPI page: coverage 7.2.4.
:arrow_right: To install: python3 -m pip install coverage==7.2.4
Fix: the [\[run\] sigterm](https://coverage.readthedocs.io/en/latest/config.html#config-run-sigterm) setting was meant to capture data if a process wa
:arrow_right: PyPI page: coverage 7.2.3.
:arrow_right: To install: python3 -m pip install coverage==7.2.3
Fix: the config_run_sigterm setting was meant to capture data if a process was terminated with a SIGTERM signal, but it didn't always. This was fixed thanks to Lewis Gaul, closing issue 1599.
Performance: HTML reports with context information are now much more compact. File sizes are typically as small as one-third the previous size, but can be dramatically smaller. This closes issue 1584 thanks to Oleh Krehel.
Development dependencies no longer use hashed pins, closing issue 1592.
Fix: if a virtualenv was created inside a source directory, and a sourced package was installed inside the virtualenv, then all of the third-party pac
coverage lcov command could create a .lcov file with incorrect LF (lines found) and LH (lines hit) totals. This is now fixed, thanks to Ian Moore.coverage xml command on Windows could create a .xml file with duplicate <package> elements. This is now fixed, thanks to Benjamin Parzella, closing issue 1573.:arrow_right: PyPI page: coverage 7.2.2.
:arrow_right: To install: python3 -m pip install coverage==7.2.2
Fix: the PyPI page had broken links to documentation pages, but no longer does, closing issue 1566.
:arrow_right: PyPI page: coverage 7.2.1.
:arrow_right: To install: python3 -m pip install coverage==7.2.1
Fix: the PyPI page had broken links to documentation pages, but no longer does, closing issue 1566.
Fix: public members of the coverage module are now properly indicated so that mypy will find them, fixing issue 1564.
Added a new setting [report] exclude_also to let you add more exclusions without overwriting the defaults. Thanks, Alpha Chen, closing issue 1391.
[report] exclude_also to let you add more exclusions without overwriting the defaults. Thanks, Alpha Chen, closing issue 1391.data_file and config_file arguments to the Coverage constructor and the basename argument to CoverageData. Closes issue 1552.py.typed file to announce our type-hintedness. Thanks, KotlinIsland.:arrow_right: PyPI page: coverage 7.2.0.
:arrow_right: To install: python3 -m pip install coverage==7.2.0
Added: the debug output file can now be specified with [run] debug_file in the configuration file. Closes issue 1319.
[run] debug_file in the configuration file. Closes issue 1319.:arrow_right: PyPI page: coverage 7.1.0.
:arrow_right: To install: python3 -m pip install coverage==7.1.0
Added: the debug output file can now be specified with [run] debug_file in the configuration file. Closes issue 1319.
Performance: fixed a slowdown with dynamic contexts that's been around since 6.4.3. The fix closes issue 1538. Thankfully this doesn't break the Cython change that fixed issue 972. Thanks to Mathieu Kniewallner for the deep investigative work and comprehensive issue report.
Typing: all product and test code has type annotations.
Fix: On Python 3.7, a file with type annotations but no from __future__ import annotations would be missing statements in the coverage report. This is
from __future__ import annotations would be missing statements in the coverage report. This is now fixed, closing issue 1524.:arrow_right: PyPI page: coverage 7.0.5.
:arrow_right: To install: python3 -m pip install coverage==7.0.5
Fix: On Python 3.7, a file with type annotations but no from __future__ import annotations would be missing statements in the coverage report. This is now fixed, closing issue 1524.
Performance: an internal cache of file names was accidentally disabled, resulting in sometimes drastic reductions in performance. This is now fixed, c
:arrow_right: PyPI page: coverage 7.0.4.
:arrow_right: To install: python3 -m pip install coverage==7.0.4
Performance: an internal cache of file names was accidentally disabled, resulting in sometimes drastic reductions in performance. This is now fixed, closing issue 1527. Thanks to Ivan Ciuvalschii for the reproducible test case.
Fix: when using pytest-cov or pytest-xdist, or perhaps both, the combining step could fail with assert row is not None using 7.0.2. This was due to a
assert row is not None using 7.0.2. This was due to a race condition that has always been possible and is still possible. In 7.0.1 and before, the error was silently swallowed by the combining code. Now it will produce a message “Couldn’t combine data file” and ignore the data file as it used to do before 7.0.2. Closes issue 1522.:arrow_right: PyPI page: coverage 7.0.3.
:arrow_right: To install: python3 -m pip install coverage==7.0.3
Fix: when using the [run] relative_files = True setting, a relative [paths] pattern was still being made absolute. This is now fixed, closing issue 15
[run] relative_files = True setting, a relative [paths] pattern was still being made absolute. This is now fixed, closing issue 1519.[toml] extra. Coverage.py will raise an error if TOML support is not installed when it sees your settings are in a .toml file. But it didn’t understand that [tools.coverage] was a valid section header, so the error wasn’t reported if you used that header, and settings were silently ignored. This is now fixed, closing issue 1516.coverage lcov report did not properly implement the --fail-under=MIN option. This has been fixed.:arrow_right: PyPI page: coverage 7.0.2.
:arrow_right: To install: python3 -m pip install coverage==7.0.2
When checking if a file mapping resolved to a file that exists, we weren’t considering files in .whl files. This is now fixed, closing issue 1511.
:arrow_right: PyPI page: coverage 7.0.1.
:arrow_right: To install: python3 -m pip install coverage==7.0.1
:arrow_right: PyPI page: coverage 7.0.0. :arrow_right: To install: python3 -m pip install coverage==7.0.0
Nothing new beyond 7.0.0b1.
:arrow_right: PyPI page: coverage 7.0.0.
:arrow_right: To install: python3 -m pip install coverage==7.0.0
The deprecated [run] note setting has been completely removed.
A number of changes have been made to file path handling, including pattern matching and path remapping with the [paths] setting (see [paths]). These changes might affect you, and require you to update your settings.
(This release includes the changes from 6.6.0b1, since 6.6.0 was never released.)
* would incorrectly match directory separators, making precise matching difficult. This is now fixed, closing issue 1407.** matches any number of nested directories, including none.coverage combine, relative file paths are implicitly combined without needing a [paths] configuration setting. This also fixed issue 991.[paths] setting like */foo will now match foo/bar.py so that relative file paths can be combined more easily.[paths], a path will be remapped only if the resulting path exists. The documentation has long said the prefix had to exist, but it was never enforced. This fixes issue 608, improves issue 649, and closes issue 757.[paths] setting to remap file paths within a single data file. Combining multiple files still requires the coverage combine step, but this simplifies some single-file situations. Closes issue 1212 and issue 713.coverage report command now has a --format= option. The original style is now --format=text, and is the default.
--format=markdown will write the table in Markdown format, thanks to Steve Oswald, closing issue 1418.--format=total will write a single total number to the output. This can be useful for making badges or writing status updates.coverage combine now hashes the data files to skip files that add no new information. This can reduce the time needed. Many details affect the speed-up, but for coverage.py’s own test suite, combining is about 40% faster. Closes issue 1483.__init__.py files to determine which directories have source that could have been imported. However, implicit namespace packages don’t require __init__.py. A new setting [report] include_namespace_packages tells coverage.py to consider these directories during reporting. Thanks to Felix Horvat for the contribution. Closes issue 1383 and issue 1024.--fail-under. This has been fixed, closing issue 1470.[run] note setting has been completely removed.:arrow_right: PyPI page: coverage 7.0.0b1.
:arrow_right: To install: python3 -m pip install coverage==7.0.0b1
(Note: 6.6.0 final was never released. These changes are part of 7.0.0b1.)
(Note: 6.6.0 final was never released. These changes are part of 7.0.0b1.)
* would incorrectly match directory separators, making precise matching difficult. This is now fixed, closing issue 1407.** matches any number of nested directories, including none.coverage combine, relative file paths are implicitly combined without needing a [paths] configuration setting. This also fixed issue 991.[paths] setting like */foo will now match foo/bar.py so that relative file paths can be combined more easily.:arrow_right: PyPI page: coverage 6.6.0b1.
:arrow_right: To install: python3 -m pip install coverage==6.6.0b1
The JSON report now includes details of which branches were taken, and which are missing for each file. Thanks, Christoph Blessing. Closes issue 1425.
class statements were marked as a branch. This wasn’t right, and has been reverted, fixing issue 1449. Note this will very slightly reduce your coverage total if you are measuring branch coverage.--debug=pathmap shows details of the remapping of paths that happens during combine due to the [paths] setting.:arrow_right: PyPI page: coverage 6.5.0.
:arrow_right: To install: python3 -m pip install coverage==6.5.0
Wheels are now provided for Python 3.11.
:arrow_right: PyPI page: coverage 6.4.4.
:arrow_right: To install: python3 -m pip install coverage==6.4.4
Fix a failure when combining data files if the file names contained glob-like patterns. Thanks, Michael Krebs and Benjamin Schubert.
:arrow_right: PyPI page: coverage 6.4.3.
:arrow_right: To install: python3 -m pip install coverage==6.4.3
Fix a failure when combining data files if the file names contained glob-like patterns. Thanks, Michael Krebs and Benjamin Schubert.
Fix a messaging failure when combining Windows data files on a different drive than the current directory, closing issue 1428. Thanks, Lorenzo Micò.
Fix path calculations when running in the root directory, as you might do in a Docker container. Thanks Arthur Rio.
Filtering in the HTML report wouldn't work when reloading the index page. This is now fixed. Thanks, Marc Legendre.
Fix a problem with Cython code measurement, closing issue 972. Thanks, Matus Valo.
Updated for a small change in Python 3.11.0 beta 4: modules now start with a line with line number 0, which is ignored. This line cannot be executed,
__init__.py) have no lines in them, rather than one phantom line. Fixes issue 1419.:arrow_right: PyPI page: coverage 6.4.2.
:arrow_right: To install: python3 -m pip install coverage==6.4.2
Greatly improved performance on PyPy, and other environments that need the pure Python trace function. Thanks, Carl Friedrich Bolz-Tereick (pull 1381
:arrow_right: PyPI page: coverage 6.4.1.
:arrow_right: To install: python3 -m pip install coverage==6.4.1
A new setting, [\[run\] sigterm](https://coverage.readthedocs.io/en/latest/config.html#config-run-sigterm), controls whether a SIGTERM signal handler
[run] sigterm = true.[ and ] for next file and previous file; u for up to the index; and ? to open/close the help panel. Thanks, J. M. F. Tsang.debug=sqldata adds more detail to debug=sql, logging all the data being written to the database.coverage report (or any of the reporting commands) in an empty directory would create a .coverage data file. Now they do not, fixing issue 1328.[toml] extra no longer installs tomli, instead using tomllib from the standard library. Thanks Shantanu.:arrow_right: PyPI page: coverage 6.4.
:arrow_right: To install: python3 -m pip install coverage==6.4
Fix: Coverage.py now builds successfully on CPython 3.11 (3.11.0b1) again. Closes issue 1367. Some results for generators may have changed.
:arrow_right: PyPI page: coverage 6.3.3.
:arrow_right: To install: python3 -m pip install coverage==6.3.3
Fix: Coverage.py now builds successfully on CPython 3.11 (3.11.0b1) again. Closes issue 1367. Some results for generators may have changed.
Fix: adapt to pypy3.9’s decorator tracing behavior. It now traces function decorators like CPython 3.8: both the @-line and the def-line are traced. F
pybehave to the list of coverage debug and --debug option options.--concurrency=multiprocessing is used without a configuration file. Closes issue 1320.:arrow_right: PyPI page: coverage 6.3.2.
:arrow_right: To install: python3 -m pip install coverage==6.3.2
Fix: adapt to pypy3.9's decorator tracing behavior. It now traces function decorators like CPython 3.8: both the @-line and the def-line are traced. Fixes issue 1326.
Debug: added pybehave to the list of coverage debug and cmd_run_debug options.
Fix: show an intelligible error message if --concurrency=multiprocessing is used without a configuration file. Closes issue 1320.
Fix: deadlocks could occur when terminating processes. Some of these deadlocks (described in issue 1310) are now fixed.
--precision on the command-line was being ignored while considering --fail-under. This is now fixed, thanks to Marcelo Trylesinski.:arrow_right: PyPI page: coverage 6.3.1.
:arrow_right: To install: python3 -m pip install coverage==6.3.1
Feature: Added the lcov command to generate reports in LCOV format. Thanks, Bradley Burns. Closes issues 587 and 626.
lcov command to generate reports in LCOV format. Thanks, Bradley Burns. Closes issues 587 and 626.--data-file option in any command that reads or writes data. This is in addition to the existing COVERAGE_FILE environment variable. Closes issue 624. Thanks, Nikita Bloshchanevich.:arrow_right: PyPI page: coverage 6.3.
:arrow_right: To install: python3 -m pip install coverage==6.3
Feature: Now the --concurrency setting can have a list of values, so that threads and another lightweight threading package can be measured together,
--concurrency setting can have a list of values, so that threads and another lightweight threading package can be measured together, such as --concurrency=gevent,thread. Closes issue 1012 and issue 1082. This also means that thread must be explicitly specified in some cases that used to be implicit such as --concurrency=multiprocessing, which must be changed to --concurrency=multiprocessing,thread.source setting is imported during startup, before the user program imports it. This could cause problems if the rest of the program isn’t ready yet. For example, issue 1203 describes a Django setting that is accessed before settings have been configured. Now the early import is wrapped in a try/except so errors then don’t stop execution.suffix=False when constructing a Coverage object with multiprocessing wouldn’t suppress the data file suffix (issue 989). This is now fixed.coverage debug data command will now sniff out combinable data files, and report on all of them.coverage debug command used to accept a number of topics at a time, and show all of them, though this was never documented. This no longer works, to allow for command-line options in the future.:arrow_right: PyPI page: coverage 6.2.
:arrow_right: To install: python3 -m pip install coverage==6.2
Python 3.11 is supported (tested with 3.11.0a2). One still-open issue has to do with exits through with-statements.
[paths] setting while combining, the [run] relative_files setting was ignored, resulting in absolute paths for remapped file names (issue 1147). This is now fixed.[report] ignore_errors. This helps with plugins failing to read files (django_coverage_plugin issue 78).:arrow_right: PyPI page: coverage 6.1.2.
:arrow_right: To install: python3 -m pip install coverage==6.1.2
Fix: The sticky header on the HTML report didn’t work unless you had branch coverage enabled. This is now fixed: the sticky header works for everyone.
:arrow_right: PyPI page: coverage 6.1.1.
:arrow_right: To install: python3 -m pip install coverage==6.1.1
Deprecated: The annotate command and the Coverage.annotate function will be removed in a future version, unless people let me know that they are using…
annotate command and the Coverage.annotate function will be removed in a future version, unless people let me know that they are using it. Instead, the html command gives better-looking (and more accurate) output, and the report -m command will tell you line numbers of missing lines. Please get in touch if you have a reason to use annotate over those better options: mailto:ned@nedbatchelder.com.COVERAGE_RUN when running your code with the coverage run command. The value is not important, and may change in the future. Closes issue 553.xml and json commands now describe what they wrote where.html, combine, xml, and json commands all accept a -q/--quiet option to suppress the messages they write to stdout about what they are doing (issue 1254).html command writes a .gitignore file into the HTML output directory, to prevent the report from being committed to git. If you want to commit it, you will need to delete that file. Closes issue 1244.:arrow_right: PyPI page: coverage 6.1.
:arrow_right: To install: python3 -m pip install coverage==6.1
Namespace packages being measured weren’t properly handled by the new code that ignores third-party packages. If the namespace package was installed,
source, or source_pkgs, or pytest-cov’s --cov) might have been only partially measured. Their top-level statements could be marked as un-executed, because they were imported by coverage.py before measurement began (issue 1232). This is now fixed, but the package will be imported twice, once by coverage.py, then again by your test suite. This could cause problems if importing the package has side effects.:arrow_right: PyPI page: coverage 6.0.2.
:arrow_right: To install: python3 -m pip install coverage==6.0.2
In 6.0, the coverage.py exceptions moved from coverage.misc to coverage.exceptions. These exceptions are not part of the public supported API, Coverag
:arrow_right: PyPI page: coverage 6.0.1.
:arrow_right: To install: python3 -m pip install coverage==6.0.1
The coverage html command now prints a message indicating where the HTML report was written. Fixes issue 1195.
coverage html command now prints a message indicating where the HTML report was written. Fixes issue 1195.coverage combine command now prints messages indicating each data file being combined. Fixes issue 1105.skip_covered or skip_empty settings. Fixes issue 1163.:arrow_right: PyPI page: coverage 6.0.
:arrow_right: To install: python3 -m pip install coverage==6.0
Dropped support for Python 2.7, PyPy 2, and Python 3.5.
match/case syntax.--fail-under=100 with coverage near 100% could result in the self-contradictory message total of 100 is less than fail-under=100. This bug (issue 1168) is now fixed.COVERAGE_DEBUG_FILE environment variable now accepts stdout and stderr to write to those destinations.:arrow_right: PyPI page: coverage 6.0b1.
:arrow_right: To install: python3 -m pip install coverage==6.0b1
Note: 5.6 final was never released. These changes are part of 6.0.
Note: 5.6 final was never released. These changes are part of 6.0.
percent_covered_display, a string with the total percentage, rounded to the same number of decimal places as the other reports’ totals.:arrow_right: PyPI page: coverage 5.6b1.
:arrow_right: To install: python3 -m pip install coverage==5.6b1
coverage combine has a new option, --keep to keep the original data files after combining them. The default is still to delete the files after they ha
coverage combine has a new option, --keep to keep the original data files after combining them. The default is still to delete the files after they have been combined. This was requested in issue 1108 and implemented in pull request 1110. Thanks, Éric Larivière.coverage report, branches aren’t reported that jump to missing lines. This adds to the long-standing behavior of not reporting branches from missing lines. Now branches are only reported if both the source and destination lines are executed. Closes both issue 1065 and issue 955.:arrow_right: PyPI page: coverage 5.5.
:arrow_right: To install: python3 -m pip install coverage==5.5
The text report produced by coverage report now always outputs a TOTAL line, even if only one Python file is reported. This makes regex parsing of the
coverage report now always outputs a TOTAL line, even if only one Python file is reported. This makes regex parsing of the output easier. Thanks, Judson Neer. This had been requested a number of times (issue 1086, issue 922, issue 732).skip_covered and skip_empty settings in the configuration file can now be specified in the [html] section, so that text reports and HTML reports can use separate settings. The HTML report will still use the [report] settings if there isn’t a value in the [html] section. Closes issue 1090.:arrow_right: PyPI page: coverage 5.4.
:arrow_right: To install: python3 -m pip install coverage==5.4
When using --source on a large source tree, v5.x was slower than previous versions. This performance regression is now fixed, closing issue 1037.
--source on a large source tree, v5.x was slower than previous versions. This performance regression is now fixed, closing issue 1037.:arrow_right: PyPI page: coverage 5.3.1.
:arrow_right: To install: python3 -m pip install coverage==5.3.1
The source setting has always been interpreted as either a file path or a module, depending on which existed. If both interpretations were valid, it w
source setting has always been interpreted as either a file path or a module, depending on which existed. If both interpretations were valid, it was assumed to be a file path. The new source_pkgs setting can be used to name a package to disambiguate this case. Thanks, Thomas Grainger. Fixes issue 268.:arrow_right: PyPI page: coverage 5.3.
:arrow_right: To install: python3 -m pip install coverage==5.3
The dark mode HTML report still used light colors for the context listing, making them unreadable (issue 1009). This is now fixed.
:arrow_right: PyPI page: coverage 5.2.1.
:arrow_right: To install: python3 -m pip install coverage==5.2.1
The dark mode HTML report still used light colors for the context listing, making them unreadable (issue 1009). This is now fixed.
The time stamp on the HTML report now includes the time zone. Thanks, Xie Yanbo (pull request 960).
The HTML report has been redesigned by Vince Salvino. There is now a dark mode, the code text is larger, and system sans serif fonts are used, in addi
coverage report and coverage html commands now accept a --precision option to control the number of decimal points displayed. Thanks, Teake Nutma (pull request 982).coverage report and coverage html commands now accept a --no-skip-covered option to negate --skip-covered. Thanks, Anthony Sottile (issue 779 and pull request 932).--skip-empty option is now available for the XML report, closing issue 976.coverage report command now accepts a --sort option to specify how to sort the results. Thanks, Jerin Peter George (pull request 1005).--fail-under value, it will now print a message making the condition clear. Thanks, Naveen Yadav (pull request 977).--debug=trace now includes information about how the --source option is being interpreted, and the module names being considered.:arrow_right: PyPI page: coverage 5.2.
:arrow_right: To install: python3 -m pip install coverage==5.2
The JSON report now includes counts of covered and missing branches. Thanks, Salvatore Zagaria.
[paths] configuration setting. Thanks to Bernát Gábor for the fix for issue 967.:arrow_right: PyPI page: coverage 5.1.
:arrow_right: To install: python3 -m pip install coverage==5.1
The JSON report now includes counts of covered and missing branches. Thanks, Salvatore Zagaria.
On Python 3.8, try-finally-return reported wrong branch coverage with decorated async functions (issue 964). This is now fixed. Thanks, Kjell Braden.
The ~coverage.Coverage.get_option and ~coverage.Coverage.set_option methods can now manipulate the [paths] configuration setting. Thanks to Bernát Gábor for the fix for issue 967.
If using the [run] relative_files setting, the XML report will use relative files in the elements indicating the location of source code. Closes issue
[run] relative_files setting, the XML report will use relative files in the <source> elements indicating the location of source code. Closes issue 948.:arrow_right: PyPI page: coverage 5.0.4.
:arrow_right: To install: python3 -m pip install coverage==5.0.4
A performance improvement in 5.0.2 didn’t work for test suites that changed directory before combining data, causing “Couldn’t use data file: no such
:arrow_right: PyPI page: coverage 5.0.3.
:arrow_right: To install: python3 -m pip install coverage==5.0.3
Programs that used multiprocessing and changed directories would fail under coverage. This is now fixed (issue 890). A side effect is that debug infor
coverage run -m) with --source, some measured modules were imported before coverage starts. This resulted in unwanted warnings (“Already imported a file that will be measured”) and a reduction in coverage totals (issue 909). This is now fixed.coverage run --debug=sys would fail with an AttributeError. This is now fixed (issue 907).:arrow_right: PyPI page: coverage 5.0.2.
:arrow_right: To install: python3 -m pip install coverage==5.0.2
If a 4.x data file is the cause of a “file is not a database” error, then use a more specific error message, “Looks like a coverage 4.x data file, are
coverage run --concurrency=multiprocessing, all data files should be named with parallel-ready suffixes. 5.0 mistakenly named the main process’ file with no suffix when using --append. This is now fixed, closing issue 880.:arrow_right: PyPI page: coverage 5.0.1.
:arrow_right: To install: python3 -m pip install coverage==5.0.1
A summary of major changes in 5.0 since 4.5.x is in see Major changes in 5.0.
Nothing new beyond 5.0b2.
A summary of major changes in 5.0 since 4.5.x is in see Major changes in 5.0.
:arrow_right: PyPI page: coverage 5.0.
:arrow_right: To install: python3 -m pip install coverage==5.0
Nothing new beyond 5.0b2.
A summary of major changes in 5.0 since 4.5.x is in see whatsnew5x.
An experimental [run] relative_files setting tells coverage to store relative file names in the data file. This makes it easier to run tests in one (o
[run] relative_files setting tells coverage to store relative file names in the data file. This makes it easier to run tests in one (or many) environments, and then report in another. It has not had much real-world testing, so it may change in incompatible ways in the future.-m now have __spec__ defined properly. This fixes issue 745 (about not being able to run unittest tests that spawn subprocesses), and issue 838, which described the problem directly.[paths] configuration section is now ordered. If you specify more than one list of patterns, the first one that matches will be used. Fixes issue 649.:arrow_right: PyPI page: coverage 5.0b2.
:arrow_right: To install: python3 -m pip install coverage==5.0b2
The [run] note setting has been deprecated. Using it will result in a warning, and the note will not be written to the data file. The corresponding Co…
--skip-empty option that skips files with no statements, notably __init__.py files. Thanks, Reya B.[toml] extra. The standard “pyproject.toml” file will be read automatically if no other configuration file is found, with settings in the [tool.coverage.] namespace. Thanks to Frazer McLean for implementation and persistence. Finishes issue 664.[run] note setting has been deprecated. Using it will result in a warning, and the note will not be written to the data file. The corresponding CoverageData methods have been removed.coverage debug sys output.[html] show_contexts=True or coverage html --show-contexts) will issue a warning if there were no contexts measured (issue 851).:arrow_right: PyPI page: coverage 5.0b1.
:arrow_right: To install: python3 -m pip install coverage==5.0b1
The CoverageData API has changed how queries are limited to specific contexts. Now you use CoverageData.set\_query\_context() to set a single exact-ma
--contexts option to use regular expressions instead of filename-style wildcards.:arrow_right: PyPI page: coverage 5.0a8.
:arrow_right: To install: python3 -m pip install coverage==5.0a8
Data can now be “reported” in JSON format, for programmatic use, as requested in issue 720. The new coverage json command writes raw and summarized da
coverage json command writes raw and summarized data to a JSON file. Thanks, Matt Bachmann.test_function dynamic context setting. Fixes issue 829.debug=plugin didn’t properly support configuration or dynamic context plugins, but now it does, closing issue 834.:arrow_right: PyPI page: coverage 5.0a7.
:arrow_right: To install: python3 -m pip install coverage==5.0a7
Your coding agent can read these notes before it upgrades. Set up the MCP server →