tox: Don't set basepython in testenv

Turns out doing this overrides the basepython for every 'py{version}'
implicit target, meaning py35, py36 etc. will use the same Python 3.x
version. We don't want that so set basepython manually.

This will hopefully be a non-issue when the gate bumps to Bionic.

Change-Id: I8d47f9ede4e9d1d221f6643135407ad2d5cea282
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
This commit is contained in:
Stephen Finucane 2018-05-30 14:54:29 +01:00
parent 89bbb3fb79
commit 90e2181d15
1 changed files with 6 additions and 5 deletions

11
tox.ini
View File

@ -3,7 +3,6 @@ minversion = 2.0
envlist = py35,py27,pep8
[testenv]
basepython = python3
setenv =
VIRTUAL_ENV={envdir}
BRANCH_NAME=master
@ -15,10 +14,8 @@ commands =
python setup.py test --coverage --coverage-package-name=oslo_log --slowest --testr-args='{posargs}'
coverage report --show-missing
[testenv:py27]
basepython = python2.7
[testenv:pep8]
basepython = python3
commands =
flake8
# Run security linter
@ -28,14 +25,17 @@ commands =
commands = {posargs}
[testenv:docs]
basepython = python3
commands = python setup.py build_sphinx
[testenv:cover]
basepython = python3
commands =
python setup.py test --coverage --coverage-package-name=oslo_log --testr-args='{posargs}'
coverage report --show-missing
[testenv:bandit]
basepython = python3
commands = bandit -r oslo_log -x tests -n5
[flake8]
@ -49,10 +49,11 @@ exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,__init__.py
import_exceptions = oslo_log._i18n
[testenv:releasenotes]
basepython = python3
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[testenv:lower-constraints]
basepython = python3
deps =
-c{toxinidir}/lower-constraints.txt
-r{toxinidir}/test-requirements.txt