From 66d993dac86be5faccc27d82b3ac7e5688659cc9 Mon Sep 17 00:00:00 2001 From: 98k <18552437190@163.com> Date: Mon, 8 Oct 2018 07:48:23 +0000 Subject: [PATCH] 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: I77690fa682cc1b880d8b63ad5c17bd6bc2ee20ba --- tox.ini | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tox.ini b/tox.ini index 9a7ae2a9..b0484f22 100644 --- a/tox.ini +++ b/tox.ini @@ -12,12 +12,14 @@ deps = bindep commands = bindep test [testenv:shellcheck] +basepython = python3 # 'shellcheck' is not an Python package, so it can be run w\o # virtual env. But tox is a usable wrapper to run any kind of tests - # let's use it for common test-run as well - for unification purposes. commands = {toxinidir}/tools/jenkins/shellcheck.sh {toxinidir} [testenv:yaml-syntaxcheck] +basepython = python3 deps = yamllint commands = {toxinidir}/tools/jenkins/yamllint.sh {toxinidir} @@ -39,6 +41,7 @@ commands = {toxinidir}/tools/jenkins/yamllint.sh {toxinidir} [unit_testenv] +basepython = python3 # *unittest tox-test's *require* pre-installed and # configured murano-test-runner. # More info: http://docs.openstack.org/developer/murano/draft/appdev-guide/app_unit_tests.html @@ -51,6 +54,7 @@ setenv = UPLOAD_TO_OS = true [testenv:refstackclient-unittest] +basepython = python3 passenv = OS_* setenv = {[unit_testenv]setenv}