Installation of Coverage

pip install coverage

running on a django project :

Running coverage

coverage run --source='.'  ./ test -v2
coverage html
coverage report

Publishing the results with

On get the token, then install

pip install python-coveralls

Now the command coveralls is available

As I don't use Travis (but not in pro) and don't have private repo, I don't put the token in a .coveralls.yml at all, so to share the result we use the command line :

COVERALLS_REPO_TOKEN=_the_long_string_of_the_token coveralls
INFO:coveralls:{"message":"Job ##1.1","url":""}

If you go back to, you will find the job and the result of the coverage

Then add the following to your README.rst (for example)

.. image::


Ready to go !