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