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: Ia069985b92af920970af9e84d37e27ddc8625437
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
Doug Hellmann 2018-06-06 16:06:02 -04:00
parent 0153a20201
commit 1562cdb243
1 changed files with 14 additions and 0 deletions

14
tox.ini
View File

@ -45,18 +45,21 @@ commands =
coverage report
[testenv:debug]
basepython = python3
description = Allows to run unit-test with debug mode enabled
commands =
{[testenv]commands}
oslo_debug_helper -t {toxinidir}/monasca_log_api/tests {posargs}
[testenv:bashate]
basepython = python3
description = Validates (pep8-like) devstack plugins
skip_install = True
usedevelop = False
commands = bash {toxinidir}/tools/bashate.sh {toxinidir}/devstack
[testenv:bandit]
basepython = python3
description = Validates codebase with bandit
skip_install = True
usedevelop = False
@ -65,6 +68,7 @@ commands =
bandit -r monasca_log_api -n5 -s B101 -x monasca_log_api/tests
[testenv:pep8]
basepython = python3
description = Runs set of linters against codebase (flake8, bandit, bashate, checkniceness)
commands =
{[testenv]commands}
@ -74,16 +78,19 @@ commands =
{[testenv:checkniceness]commands}
[testenv:flake8]
basepython = python3
description = Validates codebase with flake
commands =
{[testenv]commands}
flake8 monasca_log_api
[testenv:genconfig]
basepython = python3
description = Generates sample documentation file for monasca-log-api
commands = oslo-config-generator --config-file=config-generator/monasca-log-api.conf
[testenv:docs]
basepython = python3
description = Builds api-ref, api-guide, releasenotes and devdocs
commands =
{[testenv]commands}
@ -93,6 +100,7 @@ commands =
{[testenv:releasenotes]commands}
[testenv:api-guide]
basepython = python3
description = Called from CI scripts to test and publish the API Guide
commands =
{[testenv]commands}
@ -101,6 +109,7 @@ commands =
sphinx-build -W -b html -d api-guide/build/doctrees api-guide/source api-guide/build/html
[testenv:api-ref]
basepython = python3
description = Called from CI scripts to test and publish the API Ref
commands =
{[testenv]commands}
@ -109,12 +118,14 @@ commands =
sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html
[testenv:releasenotes]
basepython = python3
description = Called from CI script to test and publish the Release Notes
commands =
rm -rf releasenotes/build
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[testenv:devdocs]
basepython = python3
description = Builds developer documentation
commands =
{[testenv]commands}
@ -124,6 +135,7 @@ commands =
python setup.py build_sphinx
[testenv:checkniceness]
basepython = python3
description = Validates (pep-like) documenation
skip_install = True
usedevelop = False
@ -135,6 +147,7 @@ commands =
doc8 --file-encoding utf-8 {toxinidir}/releasenotes
[testenv:checkjson]
basepython = python3
description = Validates all json samples inside doc folder
skip_install = True
usedevelop = False
@ -150,6 +163,7 @@ commands =
bash -c '! find doc/ -type f -name *.json | xargs -t -n1 python -m json.tool 2>&1 > /dev/null | grep -B1 -v ^python'
[testenv:venv]
basepython = python3
commands = {posargs}
[flake8]