test(coverage): Prevent collection contamination

Given that we set `--parallel=True` in `./.coveragerc` then the following could result
in collecting data from multiple runs when not intended:

    $ coverage run ...
    $ coverage run ...
    $ coverage combine

We may want to include this into the `./tox.ini` configuration too but it will be
somewhat annoying to do that win a way that's compatible with Windows for CI.
This commit is contained in:
Ross Patterson 2020-10-04 14:10:23 -07:00
parent f1da68f340
commit 322670febc

View File

@ -51,6 +51,7 @@ test: .tox/create-venvs.log
## Run all tests with coverage collection and reporting.
test-venv-coverage:
# Special handling for reporting coverage even when the test run fails
rm -f ./.coverage.*
test_exit=
$(VIRTUAL_ENV)/bin/coverage run -m twisted.trial --rterrors --reporter=timing \
$(TEST_SUITE) || test_exit="$$?"