Browse Source

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: I65ec3ce0c72467486255868bcff79c70b9bf20f8
changes/43/573943/1
huang.zhiping 3 years ago
parent
commit
9a4c752312
1 changed files with 8 additions and 0 deletions
  1. +8
    -0
      tox.ini

+ 8
- 0
tox.ini View File

@ -23,15 +23,19 @@ whitelist_externals = npm
commands = python manage.py test octavia_dashboard --settings=octavia_dashboard.tests.settings
[testenv:pep8]
basepython = python3
commands = flake8
[testenv:venv]
basepython = python3
commands = {posargs}
[testenv:cover]
basepython = python3
commands = python setup.py test --coverage --testr-args='{posargs}'
[testenv:docs]
basepython = python3
whitelist_externals = rm
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
@ -43,6 +47,7 @@ commands =
[testenv:releasenotes]
basepython = python3
whitelist_externals = rm
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
@ -53,15 +58,18 @@ commands =
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[testenv:debug]
basepython = python3
commands = oslo_debug_helper {posargs}
[testenv:eslint]
basepython = python3
# npm must be installed on the system, for example
# sudo apt-get install npm
commands = npm install
npm run lint
[testenv:karma]
basepython = python3
# npm must be installed on the system, for example
# sudo apt-get install npm
commands = npm install


Loading…
Cancel
Save