I am using Python coverage to test my apps. Looking at other developers on GitHub I see they have a small badge which shows the percentage of coverage. Using coverage, how can I generate these badges?
The coverage badge is the one I'm looking at below.
Update: There are packages that generate badges i.e. nose-htmloutput! Cool
You can click on those badges and it'll generally take you to the service that provides them.
The coverage badge is provided by https://coveralls.io/:
Coveralls is a web service to help you track your code coverage over time, and ensure that all your new code is fully covered.
There is but one prerequisite:
- Your code must be hosted on GitHub
Once you have signed up and included the required configuration and integrations or packages when developing, you are given a image URL to include in your project documentation; the python-coveralls
project has:
.. image:: https://coveralls.io/repos/z4r/python-coveralls/badge.png?branch=master
:target: https://coveralls.io/r/z4r/python-coveralls
in their README for example, which renders as:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With