django-coverage-plugin
Django template coverage.py plugin
Decision gist · record as of 2026-08-14
Yes. The package is actively maintained, has no known vulnerabilities, low install friction, and solves a real gap in Django testing—template coverage is otherwise invisible to standard coverage.py. Install it if you use Django templates and want to measure test coverage comprehensively. The only gotcha is the requirement to enable template debugging in settings, which is documented clearly.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- DJANGO_SETTINGS_MODULE environment variable must be set, and TEMPLATES.OPTIONS.debug must be True in your Django settings for template coverage to work.
- Low install friction with a wheel distribution.
- Actively maintained as of 2026-04-04, with recent fixes for template line reporting and support for Django 5.2 and 6.0.
License · maintenance · safety
Apache-2.0 (permissive) — Licensed under Apache-2.0 (permissive), allowing use in commercial and proprietary projects with minimal restrictions beyond attribution.
last release 2026-04-04 (132 days) · last repo commit 2026-08-09 · 203 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,057,576 downloads/mo, #4,430 on PyPI
Alternatives
Verify before relying
pip install django-coverage-plugin
# Add to .coveragerc:
# [run]
# plugins = django_coverage_plugin
# Then run:
coverage run --source='.' manage.py test
coverage report- Whether template coverage accuracy varies significantly across different Django template tag libraries or custom tags
- Performance impact on large projects with hundreds or thousands of templates
What it is and what it does
django-coverage-plugin extends coverage.py to track which lines of your Django HTML templates are executed during testing. Rather than treating templates as unmeasured code, it hooks into Django's template debugging system to record which template lines ran, which didn't, and which were conditionally skipped. You configure it by adding a single line to your .coveragerc file, then run your tests normally under coverage.py—templates appear in your coverage report just like Python modules.
The plugin requires Django templates to have debugging enabled (TEMPLATES.OPTIONS.debug = True) and works with Django 5.2 through 6.0 on Python 3.10 through 3.14. It can also discover unused template files in your templates directory and include them in results. Configuration supports filtering by file extension and respects standard coverage.py settings like source, include, and omit.
Use it for
- Measure test coverage of Django template rendering to identify untested template branches and conditional blocks
- Discover unused template files in your project that can be safely removed
- Enforce minimum coverage thresholds for templates as part of CI/CD pipelines
- Debug template execution paths by seeing which lines ran during specific test cases
- Generate unified coverage reports combining Python and template coverage metrics
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
The package is actively maintained, has no known vulnerabilities, low install friction, and solves a real gap in Django testing—template coverage is otherwise invisible to standard coverage.py. Install it if you use Django templates and want to measure test coverage comprehensively. The only gotcha is the requirement to enable template debugging in settings, which is documented clearly.
Install
django-coverage-plugin on PyPI
Before you install
Low install friction with a wheel distribution. Actively maintained as of 2026-04-04, with recent fixes for template line reporting and support for Django 5.2 and 6.0. Requires only coverage and Django as runtime dependencies.
DJANGO_SETTINGS_MODULE environment variable must be set, and TEMPLATES.OPTIONS.debug must be True in your Django settings for template coverage to work.
License in practice
Licensed under Apache-2.0 (permissive), allowing use in commercial and proprietary projects with minimal restrictions beyond attribution.
Quickstart
pip install django-coverage-plugin
# Add to .coveragerc:
# [run]
# plugins = django_coverage_plugin
# Then run:
coverage run --source='.' manage.py test
coverage report
Verify before relying
- Whether template coverage accuracy varies significantly across different Django template tag libraries or custom tags
- Performance impact on large projects with hundreds or thousands of templates
Package facts
| License | Apache-2.0 permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packagescoverageDjango |
| Maintenance | Actively maintained 132 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,057,576 / month, #4,430 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableEnvironment :: ConsoleFramework :: DjangoFramework :: Django :: 5.2Framework :: Django :: 6.0Intended Audience :: DevelopersOperating System :: OS IndependentProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: Quality AssuranceTopic :: Software Development :: Testing |
Evidence: django_coverage_plugin-3.2.2-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “django template coverage measurement”
- django-coverage-pluginA coverage.py plugin that measures test coverage of Django templates,…
- django-debug-toolbar-template-timingsA Django Debug Toolbar panel that measures and displays the time…
- django-debug-toolbar-template-profilerAdds a debug panel to django-debug-toolbar that measures and displays…
Give your agent the search over MCP, or paste the wish link into any chat.
More Testing packages
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
pytest is a testing framework that lets you write test functions using plain assert statements and automatically discovers and runs them, with detailed failure reporting.
virtualenv creates isolated Python environments where packages can be installed independently without affecting the system Python or other projects.
Coverage.py measures which lines of Python code are executed during test runs, reporting coverage percentages and identifying untested code paths.
Install it if you want to measure test completeness or enforce coverage thresholds in your project.
pytest-asyncio is a pytest plugin that enables writing and running async test functions using the asyncio library, allowing developers to await code directly within test cases.
Install it if you write tests for any asyncio-based code.
A pytest plugin that generates test reports in Common Test Report Format (CTRF) as JSON, compatible with pytest-xdist and pytest-playwright for distributed and browser-based testing.
Install it if you need CTRF-formatted test output for CI/CD integration or cross-tool reporting.
See also coverage_enable_subprocess · coverage-conditional-plugin · pytest-django · covdefaults · coveralls · slipcover · pytest-cover · coverage-badge · django-health-check