[tox] envlist = {py26,py27,py33,py34,py35,py36,py37,py38} [testenv] extras = testing deps = py26,py33: pytest>=3.0.7,<3.3 py27,py34: pytest<5 py26,py33: setuptools<37 coverage: coverage setenv = # https://github.com/tomchristie/django-rest-framework/issues/1957 # tox corrupts __pycache__, solution from here: PYTHONDONTWRITEBYTECODE=1 coverage: TOX_TESTENV_COMMAND=coverage run -m pytest commands = {env:TOX_TESTENV_COMMAND:pytest} {posargs} coverage: coverage report