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: I724fee4ab31762582cb96fc91d99d62b6e637969
This commit is contained in:
huang.zhiping 2018-06-09 19:49:55 +08:00 committed by Alessandro Nesta
parent 69eb4440dc
commit f45c9d346e
1 changed files with 5 additions and 1 deletions

View File

@ -3,7 +3,6 @@ minversion = 2.0
envlist = py35,py27,pep8,docs
[testenv]
basepython = python3
install_command = pip install {opts} {packages}
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
@ -15,6 +14,7 @@ commands = python setup.py testr --slowest --testr-args='{posargs}'
basepython = python2.7
[testenv:pep8]
basepython = python3
deps =
-r{toxinidir}/test-requirements.txt
commands =
@ -23,12 +23,15 @@ commands =
bandit -r oslo_limit tests -n5
[testenv:venv]
basepython = python3
commands = {posargs}
[testenv:docs]
basepython = python3
commands = sphinx-build -W -b html doc/source doc/build/html
[testenv:cover]
basepython = python3
commands = python setup.py test --coverage --coverage-package-name=oslo_limit --testr-args='{posargs}'
[flake8]
@ -41,6 +44,7 @@ exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
import_exceptions = oslo_limit._i18n
[testenv:lower-constraints]
basepython = python3
deps =
-c{toxinidir}/lower-constraints.txt
-r{toxinidir}/test-requirements.txt