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: I9f7df241e90aa2b82813a41f330e3890e08b5869
This commit is contained in:
huang.zhiping 2018-06-09 18:41:00 +08:00
parent b3b4555b09
commit a6da038b8c
1 changed files with 5 additions and 1 deletions

View File

@ -32,20 +32,23 @@ commands =
ostestr {posargs}
[testenv:py3]
basepython = python3
commands =
{[testenv]commands}
/bin/cp -r {toxinidir}/nova/virt/lxd/ {toxinidir}/.tox/py3/src/nova/nova/virt/
ostestr {posargs}
[testenv:pep8]
basepython = python2.7
basepython = python3
deps = {[testenv]deps}
commands = flake8 {toxinidir}/nova
[testenv:venv]
basepython = python3
commands = {posargs}
[testenv:cover]
basepython = python3
# Also do not run test_coverage_ext tests while gathering coverage as those
# tests conflict with coverage.
commands =
@ -55,6 +58,7 @@ commands =
coverage report
[testenv:docs]
basepython = python3
commands = python setup.py build_sphinx
[flake8]