Opened at 2012-03-30T23:43:12Z
Last modified at 2014-09-10T08:41:36Z
#1698 closed defect
the preferred cmdline to run tests under coverage is pretty huge, and comes in two flavors due to Debian renaming of the script — at Initial Version
Reported by: | davidsarah | Owned by: | somebody |
---|---|---|---|
Priority: | normal | Milestone: | 1.10.1 |
Component: | code | Version: | 1.9.1 |
Keywords: | usability test coverage | Cc: | |
Launchpad Bug: |
Description
The preferred command line to run tests recording coverage information is:
bin/tahoe @coverage run --branch @tahoe debug trial [ARGS]
but Debian/Ubuntu? renamed the "coverage" script to "python-coverage", in which case it is:
bin/tahoe @python-coverage run --branch @tahoe debug trial [ARGS]
PYTHONPATH=. python bin/tahoe debug trial --reporter=bwverbose-coverage [ARGS]
or it is also possible to use:
bin/tahoe debug trial --coverage [ARGS]
However, these seem to cover fewer lines than the "coverage run" approach, in particular, top-level declarations in some files (for which their omission is clearly a bug... there's no way to import those files without executing those lines). Also, --reporter=bwverbose-coverage and --coverage do not allow passing additional options to 'coverage', therefore they do not support obtaining branch coverage, which is more useful.
To fix this ticket, add and document a way to run tests with correct branch coverage that works on all platforms using a short command line.