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: I56f24f07b036e03fd7788f5bc3303aa9f65949db
This commit is contained in:
huang.zhiping 2018-06-08 22:48:25 +08:00 committed by Alessandro Nesta
parent 40e03ab095
commit 4144fed5dc
1 changed files with 7 additions and 1 deletions

View File

@ -1,6 +1,6 @@
[tox]
minversion = 1.6
envlist = py27,pypy,pep8
envlist = py27,py35,pypy,pep8
skipsdist = True
[testenv]
@ -16,21 +16,27 @@ commands = python setup.py test --slowest --testr-args='{posargs}'
commands = flake8
[testenv:venv]
basepython = python3
commands = {posargs}
[testenv:genconfig]
basepython = python3
commands = oslo-config-generator --config-file etc/cloudpulse/cloudpulse-config-generator.conf
[testenv:cover]
basepython = python3
commands = python setup.py test --coverage --testr-args='{posargs}'
[testenv:docs]
basepython = python3
commands = python setup.py build_sphinx
[testenv:debug]
basepython = python3
commands = oslo_debug_helper {posargs}
[testenv:bandit]
basepython = python3
deps = bandit
commands = bandit -c bandit.yaml -r cloudpulse -p gate