Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

Measure Python Code Coverage using coverage.py

pip3 install coverage

poetry run coverage run -m pytest

poetry run coverage report -m

poetry run coverage html

PyTest

pipinstallpytestcov pip install pytest-cov py.test --cov-report=xml --cov=myproj tests/

Tools

coverage

CodeCov

https://coveralls.io/

https://github.com/aconrad/pycobertura

References

Beginner’s guide to using Codecov with Python and Travis CI

CodeCov