fix 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: If6edee698b2a4f0ba5afc13e89462d3b38d753e1
This commit is contained in:
huang.zhiping 2018-06-08 14:10:31 +08:00
parent 0ecce126dc
commit c8ed1be3e4
1 changed files with 6 additions and 0 deletions

View File

@ -4,6 +4,7 @@ envlist = pypy,py35,py27,pep8,docs
skipsdist = True skipsdist = True
[testenv] [testenv]
basepython = python3
usedevelop = True usedevelop = True
install_command = pip install -U {opts} {packages} install_command = pip install -U {opts} {packages}
setenv = setenv =
@ -18,6 +19,7 @@ commands =
coverage erase coverage erase
[testenv:docs] [testenv:docs]
basepython = python3
deps = deps =
doc8 doc8
sphinx sphinx
@ -26,21 +28,25 @@ commands =
doc8 --allow-long-titles doc/source doc8 --allow-long-titles doc/source
[testenv:pep8] [testenv:pep8]
basepython = python3
commands = commands =
flake8 {posargs} anchor flake8 {posargs} anchor
flake8 {posargs} tests flake8 {posargs} tests
bandit -r anchor bandit -r anchor
[testenv:venv] [testenv:venv]
basepython = python3
commands = {posargs} commands = {posargs}
[testenv:cover] [testenv:cover]
basepython = python3
commands = commands =
python setup.py testr --coverage --testr-args='{posargs}' python setup.py testr --coverage --testr-args='{posargs}'
coverage combine coverage combine
coverage xml coverage xml
[testenv:bandit] [testenv:bandit]
basepython = python3
deps = -r{toxinidir}/test-requirements.txt deps = -r{toxinidir}/test-requirements.txt
commands = bandit -r anchor commands = bandit -r anchor