diff options
author | Doug Hellmann <doug@doughellmann.com> | 2018-06-06 17:58:18 -0400 |
---|---|---|
committer | Nguyen Hai <nguyentrihai93@gmail.com> | 2018-08-29 04:30:08 +0000 |
commit | f0640571d1d32210c6121763e4222069e6d539f8 (patch) | |
tree | 4a30ca663461f72ee509b5be8610652fac0ffc15 | |
parent | 2c0629e7d9f6b6ab1b9f41ed82d69716f763c089 (diff) | |
download | python-neutronclient-f0640571d1d32210c6121763e4222069e6d539f8.tar.gz |
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>
-rw-r--r-- | tox.ini | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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 |