Skip to main content
Help us improve Python packaging – donate today!

Code coverage reports for Django unit testing framework

Project Description


This project is no longer maintained. See Django documentation for an alternative:


django-testcoverage is a package providing code coverage reports for built-in Django unit testing framework.



$ pip install django-testcoverage

Now add a following line to your

TEST_RUNNER = 'testcoverage.test_runner.TestCoverageTestRunner'

And you’re ready to go!


Coverage reports are active for default, so you can just run your test as always:

$ ./ test

This will print the coverage report for all Python modules in your project (including Django’s!) which is almost never what you want. You can specify which applications should be tested:

$ ./ test myapp secondapp

If you do so, coverage reports will be computed only for listed apps. You can also globally specify which packages should be included in your coverage reports using adding TESTCOVERAGE_APPS to your, like:


Then you can run tests for all applications, but only these listed in TESTCOVERAGE_APPS will be included in the coverage report.

You can also turn off coverage reporting by adding to your settings:


Author and license

Copyright (c) 2011-2014 Mikołaj Siedlarek <mikolaj.siedlarek at>

Distributed on terms of 3-clause BSD license (AKA New BSD License or Modified BSD License).

For details conslut LICENSE.txt file.

Release history Release notifications

This version
History Node


History Node


History Node


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
django-testcoverage-0.1.3.tar.gz (3.2 kB) Copy SHA256 hash SHA256 Source None Mar 24, 2011

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page