From 90e2181d156d5b5ff744e4455a35573291562236 Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Wed, 30 May 2018 14:54:29 +0100 Subject: [PATCH] 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 --- tox.ini | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tox.ini b/tox.ini index a6ea53cd..b0b2a1a9 100644 --- a/tox.ini +++ b/tox.ini @@ -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