Add tox python3 overrides

We want to default to running all tox environments under python 3, so
set the basepython value in each environment.

We do not want to specify a minor version number, because we do not
want to have to update the file every time we upgrade python.

We do not want to set the override once in testenv, because that
breaks the more specific versions used in default environments like
py35 and py36.

Change-Id: Ic4a3b28cb670c71fb205640a9a9338bbcf9bc9bf
This commit is contained in:
huang.zhiping 2018-07-18 16:57:32 -04:00 committed by Zane Bitter
parent bee7811c80
commit d6f8cda665
1 changed files with 5 additions and 1 deletions

View File

@ -1,5 +1,5 @@
[tox]
envlist = py34,py27,pep8
envlist = py35,py27,pep8
[testenv]
setenv = VIRTUAL_ENV={envdir}
@ -9,6 +9,7 @@ deps = -r{toxinidir}/requirements.txt
commands = python setup.py testr --slowest --testr-args='{posargs}'
[testenv:pep8]
basepython = python3
commands = flake8
flake8 --filename=cfn-* bin
@ -19,10 +20,12 @@ deps = -r{toxinidir}/requirements.txt
commands = bash tools/lintstack.sh
[testenv:cover]
basepython = python3
commands =
python setup.py testr --coverage --testr-args='{posargs}'
[testenv:venv]
basepython = python3
commands = {posargs}
[flake8]
@ -30,6 +33,7 @@ show-source = true
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,tools
[testenv:docs]
basepython = python3
deps = -r{toxinidir}/doc/requirements.txt
commands = sphinx-build -W -b html doc/source doc/build/html