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: I6517c605ff16f459d5b116c733c1674201b024d8
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
Doug Hellmann
2018-06-06 17:58:19 -04:00
parent a54d235424
commit 72e32b7057

View File

@@ -20,6 +20,7 @@ whitelist_externals = find
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
[testenv:debug]
basepython = python3
commands = oslo_debug_helper -t saharaclient/tests/unit {posargs}
[testenv:debug-py27]
@@ -31,6 +32,7 @@ basepython = python3.5
commands = oslo_debug_helper -t saharaclient/tests/unit {posargs}
[testenv:cover]
basepython = python3
commands =
python setup.py test --coverage --testr-args='{posargs}'
coverage report
@@ -39,10 +41,12 @@ commands =
sitepackages = False
[testenv:pep8]
basepython = python3
sitepackages = False
commands = flake8
[testenv:doc8]
basepython = python3
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
-r{toxinidir}/requirements.txt
@@ -51,9 +55,11 @@ deps =
commands = doc8 doc/source
[testenv:venv]
basepython = python3
commands = {posargs}
[testenv:docs]
basepython = python3
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
-r{toxinidir}/requirements.txt
@@ -63,6 +69,7 @@ commands =
sphinx-build -W -b html doc/source doc/build/html
[testenv:releasenotes]
basepython = python3
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
-r{toxinidir}/requirements.txt