We should track what percentage of the codebase is being tested, probably on Travis.
$ 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
Coverage data is being sent to https://codecov.io/github/wikimedia/pywikibot-core for the Travis builds.
Still to do:
[ ] coverage of subprocesses
[x] 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.
[x] send coverage data to a location where it is accessible (https://github.com/codecov/support/issues/106)
[ ] periodically backup coverage data to a location under wikimedia control, so rough historical progress stats can be rebuilt later if necessary
[ ] Travis coverage data should include `generate_*` used before the tests.
[ ] Exclude `.eggs` from coverage data