From 322670febc48b566c11d1c0783168c7fd099cb85 Mon Sep 17 00:00:00 2001 From: Ross Patterson Date: Sun, 4 Oct 2020 14:10:23 -0700 Subject: [PATCH] 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. --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 861bf67b5..b48e74b0e 100644 --- a/Makefile +++ b/Makefile @@ -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="$$?"