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: I9dc46eef025a128244e54f580c4d67974657e74d
This commit is contained in:
huang.zhiping 2018-08-15 06:58:13 +00:00
parent 894abebf4a
commit 3e54e0a06e
1 changed files with 7 additions and 0 deletions

View File

@ -20,12 +20,15 @@ deps =
commands = python manage.py test {posargs} --settings=masakaridashboard.test.settings --ignore-files=masakaridashboard/test/uuidsentinel.py
[testenv:pep8]
basepython = python3
commands = flake8 {posargs}
[testenv:venv]
basepython = python3
commands = {posargs}
[testenv:cover]
basepython = python3
commands =
coverage erase
coverage run {toxinidir}/manage.py test masakaridashboard --settings=masakaridashboard.test.settings {posargs} --exclude-dir=masakaridashboard/test/integration_tests {posargs}
@ -39,6 +42,7 @@ commands =
python manage.py test {posargs} --settings=masakaridashboard.test.settings --ignore-files=masakaridashboard/test/uuidsentinel.py
[testenv:eslint]
basepython = python3
whitelist_externals = npm
commands =
npm install
@ -46,6 +50,7 @@ commands =
npm run lint
[testenv:karma]
basepython = python3
# NOTE(shu-mutou): Until PhantomJS setup get reliable, we use
# Chromium for JS test. And npm can't launch Chromium via tox.
#whitelist_externals = npm
@ -59,6 +64,7 @@ commands =
echo "nexecute `npm run test`"
[testenv:docs]
basepython = python3
# We need to install horizon dependencies to build module references
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
@ -68,6 +74,7 @@ commands =
sphinx-build -W -b html doc/source doc/build/html
[testenv:releasenotes]
basepython = python3
# There is no need to install horizon.
usedevelop = False
deps =