Blog Archive for April 19, 2019

Django Code Coverage

April 19, 2019

I have a Django application with tests, and I wanted to see what my code coverage was when those tests are run. This is fairly straightforward.

First, install coverage:

$ pip install coverage

Then, instead of running python manage.py test, run the following in the same directory:

$ coverage …