# HG changeset patch # User Ilya Etingof <etingof@gmail.com> # Date 1584197098 -3600 # Sat Mar 14 15:44:58 2020 +0100 # Node ID 0b54d0b022c2ff82227b7972ea0c77f83cef17fd # Parent 5ed223c1884a7bca6a0e51b4e5c71867cacfcce0 Run unittests from tox across many Pythons diff --git a/tox.ini b/tox.ini --- a/tox.ini +++ b/tox.ini @@ -1,23 +1,50 @@ [tox] minversion = 3.5.0 -envlist = unittest, docs, bandit, build +envlist = + {py27, py35, py36, py37, py38}-{unittest}, + cover, docs, bandit, build +isolated_build = true +skip_missing_interpreters = true [testenv] -basepython = python3 usedevelop = True setenv = VIRTUAL_ENV={envdir} PYTHONWARNINGS=default::DeprecationWarning -install_command = pip install {opts} {packages} +deps = pip >= 19.3.1 +install_command = + pip install {opts} {packages} [testenv:unittest] deps = - discover - -r{toxinidir}/devel-requirements.txt - -r{toxinidir}/requirements.txt -commands = discover -s tests + discover + -r{toxinidir}/devel-requirements.txt + -r{toxinidir}/requirements.txt +commands = + discover -s tests + +[testenv:py27-unittest] +deps = {[testenv:unittest]deps} +commands = {[testenv:unittest]commands} + +[testenv:py35-unittest] +deps = {[testenv:unittest]deps} +commands = {[testenv:unittest]commands} + +[testenv:py36-unittest] +deps = {[testenv:unittest]deps} +commands = {[testenv:unittest]commands} + +[testenv:py37-unittest] +deps = {[testenv:unittest]deps} +commands = {[testenv:unittest]commands} + +[testenv:py38-unittest] +deps = {[testenv:unittest]deps} +commands = {[testenv:unittest]commands} [testenv:cover] +basepython = python3.7 setenv = {[testenv]setenv} PYTHON=coverage run --parallel-mode