From 0421ec974415354d834d86e55b522d17b8c1005c Mon Sep 17 00:00:00 2001 From: Ilya Etingof Date: Sat, 14 Mar 2020 15:44:58 +0100 Subject: Run unittests from tox across many Pythons --- tox.ini | 41 ++++++++++++++++++++++++++++++++++------- 1 file changed, 34 insertions(+), 7 deletions(-) diff --git a/tox.ini b/tox.ini index 52d8772..b76ff28 100644 --- 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 -- cgit v1.2.1