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 Version 5
Reported by: | davidsarah | Owned by: | davidsarah |
---|---|---|---|
Priority: | normal | Milestone: | 1.10.1 |
Component: | code | Version: | 1.9.1 |
Keywords: | usability test coverage | Cc: | |
Launchpad Bug: |
Description (last modified by warner)
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.
Change History (5)
comment:1 Changed at 2012-03-30T23:49:32Z by davidsarah
comment:2 Changed at 2012-03-30T23:52:22Z by davidsarah
It should also be documented how to run tests with coverage for the Tahoe installed from an OS package (/usr/bin/tahoe).
comment:3 Changed at 2012-11-02T01:04:02Z by davidsarah
- Owner changed from somebody to davidsarah
- Status changed from new to assigned
comment:4 Changed at 2012-11-02T01:07:55Z by davidsarah
- Milestone changed from 1.11.0 to eventually
comment:5 Changed at 2014-09-02T17:02:18Z by warner
- Description modified (diff)
also see #2289 (--branch coverage)
... and preferably that allows us to delete the bwverbose-coverage reporter plugin.