pytest-cov module is excellent for recursively testing coverage.
[run] cover_pylib = false omit = /home/travis/virtualenv/* */site-packages/* */bin/* [report] exclude_lines = pragma: no cover def __repr__ RuntimeError NotImplementedError FileNotFoundError ImportError
.travis.yml must have a line like
after_success: - pytest --cov
Coverage on own computer
To help debug coverage issues, simply do the coverage test on your own computer, from Terminal:
pytest --cov --cov-report 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.