Other resources

There are a number of projects that help integrate coverage.py into other systems, provide help using it, offer assistance, and so on.

There’s no guarantee these items are maintained or work well. Some of them seem to be quite old. If you have suggestions for updates to this page, open a pull request or get in touch some other way.

Test runners

Helpers for using coverage with specific test runners.

Configuration helpers

Tools to provide more control over how coverage is configured.

  • covdefaults provides “sensible” default settings for coverage.

  • coverage-conditional-plugin lets you use conditions instead of simple “no cover” pragmas to control what lines are considered under different conditions.

Language plugins

Coverage.py plugins to enable coverage measurement of other languages.

  • django-coverage measures the coverage of Django templates.

  • Cython provides a plugin for measuring Cythonized code.

  • coverage-jinja-plugin is an incomplete Jinja2 plugin.

  • coverage-sh measures code coverage of shell (sh or bash) scripts executed from Python with subprocess.

  • hy-coverage supports the Hy language.

  • coverage-mako-plugin measures coverage in Mako templates. Doesn’t work yet, probably needs some changes in Mako itself.

Reporting helpers

Helpers for seeing the results.

  • python-coverage-comment-action can publish a delta coverage report as a pull request comment, create a coverage badge, or a dashboard to display in your readme.

  • diff-cover reports on the coverage of lines changed in a pull request.

  • cuvner offers alternate visualizations of coverage data, including ones for use in terminals.

  • emacs-python-coverage is an experimental Emacs package to report code coverage output produced by Python’s coverage package directly inside Emacs buffers.

  • python-genbadge provides a set of command line utilities to generate badges for tools that do not provide one, including coverage badges.