Login or Sign up

Use coverage.py to browse the test coverage for your django project

Posted by: skyl on Jan. 5, 2010

Install coverage:

pip install coverage

Run the test suite with coverage:

coverage run manage.py test

Generate the html coverage report:

coverage html -d htmlcov -i

now you can view myproj/htmlcov/index.html in your browser.

Logically, coverage help, coverage help html and the like will yield everything you need to get further.

I smell a new fast food series on testing coming.

Comments on This Post:

Please Login (or Sign Up) to leave a comment