automatic code coverage tests

.travis.yml code coverage tests using can track code coverage. The one-time setup is very similar to Travis-CI with a account.

The pytest-cov module is excellent for recursively testing coverage. Create file .coveragerc like:

cover_pylib = false
omit =

exclude_lines =
  pragma: no cover
  def __repr__

.travis.yml must have a line like

  - 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.