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: Id3e87ce28348d247545ce979f6b34a1cb76beb8c
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
Doug Hellmann 2018-09-26 18:56:41 -04:00 committed by Witold Bedyk
parent 4b33d1b338
commit 09356e0b9f
1 changed files with 5 additions and 0 deletions

View File

@ -36,6 +36,7 @@ commands =
ostestr {posargs}
[testenv:cover]
basepython = python3
description = Calculates code coverage
setenv =
PYTHON=coverage run --source monasca_events_api --parallel-mode
@ -69,6 +70,7 @@ commands =
flake8 monasca_events_api
[testenv:pep8]
basepython = python3
description = Runs set of linters against codebase (flake8, bandit, bashate, checkniceness)
commands =
{[testenv:flake8]commands}
@ -78,6 +80,7 @@ commands =
python setup.py check --restructuredtext --strict
[testenv:docs]
basepython = python3
description = Builds api-ref, releasenotes and devdocs
commands =
{[testenv:devdocs]commands}
@ -92,6 +95,7 @@ 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
@ -134,6 +138,7 @@ description = Generates sample policy.yaml file for monasca-events-api
commands = oslopolicy-sample-generator --config-file=config-generator/policy.conf
[testenv:venv]
basepython = python3
commands = {posargs}
[flake8]