#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]

The Makefile uses:

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 (0)

Note: See TracTickets for help on using tickets.