diff --git a/examples/adhoc-layout/tox.ini b/examples/adhoc-layout/tox.ini index a2472d03..6e299f24 100644 --- a/examples/adhoc-layout/tox.ini +++ b/examples/adhoc-layout/tox.ini @@ -1,12 +1,14 @@ [tox] -envlist = clean,py27,py38,report +envlist = py27,py38,report [tool:pytest] addopts = --cov-report=term-missing [testenv] -commands = pytest --cov --cov-append --cov-config={toxinidir}/.coveragerc {posargs:-vv} +setenv = + py{27,38}: COVERAGE_FILE = .coverage.{envname} +commands = pytest --cov --cov-config={toxinidir}/.coveragerc {posargs:-vv} deps = pytest coverage @@ -17,7 +19,6 @@ deps = ../.. depends = - {py27,py38}: clean report: py27,py38 # note that this is necessary to prevent the tests importing the code from your badly laid project @@ -27,10 +28,6 @@ changedir = tests skip_install = true deps = coverage commands = + coverage combine coverage html coverage report --fail-under=100 - -[testenv:clean] -skip_install = true -deps = coverage -commands = coverage erase diff --git a/examples/src-layout/tox.ini b/examples/src-layout/tox.ini index 054b4b80..6be8e73d 100644 --- a/examples/src-layout/tox.ini +++ b/examples/src-layout/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = clean,py27,py38,report +envlist = py27,py38,report [tool:pytest] testpaths = tests @@ -7,7 +7,9 @@ addopts = --cov-report=term-missing [testenv] -commands = pytest --cov --cov-append {posargs:-vv} +setenv = + py{27,38}: COVERAGE_FILE = .coverage.{envname} +commands = pytest --cov {posargs:-vv} deps = pytest coverage @@ -18,17 +20,12 @@ deps = ../.. depends = - {py27,py38}: clean report: py27,py38 [testenv:report] skip_install = true deps = coverage commands = + coverage combine coverage html coverage report --fail-under=100 - -[testenv:clean] -skip_install = true -deps = coverage -commands = coverage erase