[tox] envlist = pypy3,py39,report [tool:pytest] addopts = --cov-report=term-missing [testenv] setenv = py{py3,39}: COVERAGE_FILE = .coverage.{envname} commands = pytest --cov --cov-config={toxinidir}/.coveragerc {posargs:-vv} deps = pytest coverage # Note: # This is here just to allow examples to be tested against # the current code of pytest-cov. If you copy this then # use "pytest-cov" instead of "../.." ../.. depends = report: pypy3,py39 # note that this is necessary to prevent the tests importing the code from your badly laid project changedir = tests [testenv:report] skip_install = true deps = coverage commands = coverage combine coverage html coverage report --fail-under=100