We should track what percentage of the codebase is being tested, probably on Travis.
coverage works:
$ coverage-2.7 run --source=pywikibot setup.py test
http://nose.readthedocs.org/en/latest/plugins/cover.html also works (it uses `coverage`):
$ nosetests --with-coverage --cover-package=pywikibot tests
I've uploaded our current coverage stats to
https://www.mediawiki.org/wiki/Manual:Pywikibot/Test_coverage
Coverage data is being sent to https://codecov.io/github/wikimedia/pywikibot-core for the Travis builds.
Still to do:
[ ] coverage of subprocesses
[ ] Appveyor (win32) builds
[ ] Jenkins/`tox` integration
[ ] coverage of failed jobs is usually still important data; incidental errors/failures in tests shouldnt cause our coverage percentages to decrease.
[ ] send coverage data to a location where it is accessible
[ ] Travis coverage data should include `generate_*` used before the tests.
[ ] Exclude `.eggs` from coverage data