Related: Travis-CI examples
At the bottom of most of my .travis.yml are code coverage tests using coveralls.io. The one-time setup is very similar to Travis-CI:
- Create a free coveralls.io account–perhaps using your Github credentials
- add a repository to Coveralls
You can have custom directories/patterns omitted from the coverage test.
.coveragerc file something like:
[run] cover_pylib = false omit = /home/travis/virtualenv/* [report] exclude_lines = pragma: no cover def __repr__ RuntimeError NotImplementedError ImportError
Coverage on own computer
To help debug coverage issues, simply do the coverage test on your own computer, from Terminal:
coverage run tests/test_all.py coverage html firefox htmlcov/index.html
and then you can browse a color-highlighted version of each of your files, showing which lines were excluded, covered or not covered.
and thus does coverage on the system Python libraries! This is not desired behavior.