Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

A simple way to get your Django application's test coverage.

Project Description

Django Test Coverage


The test runner is an extended version of the default Django test runner. It adds the ability to get coverage reports from defined modules or tested apps.

It requires Ned Batchelder’s


Simple add the line

TEST_RUNNER = ‘django_test_coverage.runner.run_tests’

to your Django settings file. If you run the test with

python test foo

the test runner will evaluate all modules in the app foo and add them to the coverage report. You can also specify a set of modules by adding the line

COVERAGE_MODULES = (‘’, ‘foo.baz’)

to your settings file. In this example foo should be replaced with your application name and bar/baz with your module included in the reported.


There is no implementation to wrap around Django’s PostGIS test runner.


0.1 (2009-03-03)

  • Initial Release

0.2 (2012-08-07)

  • New maintainer
  • Added Django 1.4 compatibility
  • Added support for specifying a default set of apps to perform coverage on
  • Misc bugfixes & cleanup

Release History

This version
History Node


History Node


Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting