From 40783cee5e520173a4cc37c23dd97be2d37b65fd Mon Sep 17 00:00:00 2001 From: Angus Lees Date: Mon, 2 Mar 2015 17:06:54 +1100 Subject: [PATCH] Ensure tests run under python2.7 tox uses whatever python version that tox ran with as the default python version for environments (py27,py3x, etc are given a more specific default). Debian's python-tox (for example) uses python3, but we require python2.7 - and a naive `apt-get install python-tox; tox -epep8` fails with py3-related errors on Debian. This change explicitly sets `basepython = python2.7` in several testing environments that would otherwise have used the default basepython. Change-Id: I377ac6d72dec5b85c105d8a1a74f6974efb84dcf --- tox.ini | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tox.ini b/tox.ini index 54d91612310..e09a4042260 100644 --- a/tox.ini +++ b/tox.ini @@ -26,9 +26,11 @@ commands = setenv = VIRTUAL_ENV={envdir} [testenv:api] +basepython = python2.7 setenv = OS_TEST_PATH=./neutron/tests/api [testenv:functional] +basepython = python2.7 setenv = OS_TEST_PATH=./neutron/tests/functional OS_TEST_TIMEOUT=90 deps = @@ -36,6 +38,7 @@ deps = -r{toxinidir}/neutron/tests/functional/requirements.txt [testenv:dsvm-functional] +basepython = python2.7 setenv = OS_TEST_PATH=./neutron/tests/functional OS_SUDO_TESTING=1 OS_ROOTWRAP_CMD=sudo {envbindir}/neutron-rootwrap {envdir}/etc/neutron/rootwrap.conf @@ -50,6 +53,7 @@ sitepackages = True downloadcache = ~/cache/pip [testenv:pep8] +basepython = python2.7 deps = {[testenv]deps} pylint @@ -62,6 +66,7 @@ commands= whitelist_externals = sh [testenv:cover] +basepython = python2.7 commands = python setup.py testr --coverage --testr-args='{posargs}'