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: If690ed2c2e50b86abb1faa4bc1d1238fb688a90f
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
Doug Hellmann 2018-06-06 16:06:04 -04:00 committed by Duc Truong
parent 7f2a57df84
commit 4f330e8c7b
1 changed files with 10 additions and 0 deletions

10
tox.ini
View File

@ -26,6 +26,7 @@ whitelist_externals = bash
rm
[testenv:debug]
basepython = python3
commands = oslo_debug_helper -t senlin/tests/unit {posargs}
[testenv:debug-py27]
@ -37,29 +38,35 @@ basepython = python3.5
commands = oslo_debug_helper -t senlin/tests/unit {posargs}
[testenv:pep8]
basepython = python3
commands =
flake8 senlin
[testenv:genconfig]
basepython = python3
envdir = {toxworkdir}/venv
commands =
{toxinidir}/tools/gen-config
[testenv:genpolicy]
basepython = python3
envdir = {toxworkdir}/venv
commands =
{toxinidir}/tools/gen-policy
[testenv:venv]
basepython = python3
commands = {posargs}
[testenv:cover]
basepython = python3
setenv =
{[testenv]setenv}
PYTHON=coverage run --source senlin --parallel-mode
commands = {toxinidir}/tools/cover.sh {posargs}
[testenv:docs]
basepython = python3
deps = -r{toxinidir}/doc/requirements.txt
commands =
sphinx-build -W -b html doc/source doc/build/html
@ -67,10 +74,12 @@ commands =
whitelist_externals = rm
[testenv:releasenotes]
basepython = python3
deps = -r{toxinidir}/doc/requirements.txt
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[testenv:api-ref]
basepython = python3
commands =
sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html
@ -89,6 +98,7 @@ local-check-factory = senlin.hacking.checks.factory
import_exceptions = senlin.common.i18n
[testenv:bandit]
basepython = python3
deps = -r{toxinidir}/test-requirements.txt
commands = bandit -r senlin -x tests -s B101,B104,B110,B310,B311,B506