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. Co-Authored-By: Nguyen Hai <nguyentrihai93@gmail.com> Change-Id: I6f4a539c68b036474be4ba433cb28293c0ce94e2 Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
parent
2c0629e7d9
commit
f0640571d1
7
tox.ini
7
tox.ini
|
@ -25,12 +25,14 @@ commands = sh -c "find . -type d -name '.?*' -prune -o \
|
|||
whitelist_externals = sh
|
||||
|
||||
[testenv:pep8]
|
||||
basepython = python3
|
||||
commands =
|
||||
flake8
|
||||
{[testenv:bandit]commands}
|
||||
distribute = false
|
||||
|
||||
[testenv:venv]
|
||||
basepython = python3
|
||||
commands = {posargs}
|
||||
|
||||
[testenv:functional]
|
||||
|
@ -44,19 +46,23 @@ setenv =
|
|||
OS_NEUTRONCLIENT_EXEC_DIR = {envdir}/bin
|
||||
|
||||
[testenv:cover]
|
||||
basepython = python3
|
||||
commands =
|
||||
python setup.py test --coverage --coverage-package-name=neutronclient --testr-args='{posargs}'
|
||||
coverage report
|
||||
|
||||
[testenv:docs]
|
||||
basepython = python3
|
||||
deps = -r{toxinidir}/doc/requirements.txt
|
||||
commands = sphinx-build -W -b html doc/source doc/build/html
|
||||
|
||||
[testenv:releasenotes]
|
||||
basepython = python3
|
||||
deps = -r{toxinidir}/doc/requirements.txt
|
||||
commands = sphinx-build -a -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
||||
|
||||
[flake8]
|
||||
basepython = python3
|
||||
show-source = true
|
||||
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,tools
|
||||
import-order-style = pep8
|
||||
|
@ -65,6 +71,7 @@ import-order-style = pep8
|
|||
enable-extensions=H904
|
||||
|
||||
[testenv:bandit]
|
||||
basepython = python3
|
||||
# B303: blacklist calls: md5, sha1
|
||||
deps = -r{toxinidir}/test-requirements.txt
|
||||
commands = bandit -r neutronclient -x tests -n5 -s B303
|
||||
|
|
Loading…
Reference in New Issue