Here is my tox.ini:
[tox]
envlist = py27,py35
[testenv]
deps =
Flask
connexion
pytest
coverage
pytest-cov
requests
six
commands=pytest --junitxml xunit-reports/xunit-result-XXX.xml --cov {envsitepackagesdir} --cov-report=xml
[testenv:local]
#HOW DO I SPECIFY A NEW LIST OF PYENV LIKE 31,36 IN HERE????
commands=
pytest --cov {envsitepackagesdir}/XXX --cov-report html
When I run tox it runs in py27 and py35. I want tox -e local to run in a different set of multiple python environments. I can't figure out how to do this. How do I do this? Right now it does not even respect the intial envlist and only runs on Python 2.7.
[tox]envlistis only a default — a list of environments to run whentoxis invoked without option-eand withoutTOXENVenvironment variable. Once you usetox -e[tox]envlistis ignored.You can run
localenvironment with different python versions, but I don't know any way to run it multiple times. You have to list all environments explicitly:You can shorten the command line using tox' conventions: