From 402c0847a39c8e7a52bd1de2ea05a3f40fe7e47d Mon Sep 17 00:00:00 2001 From: "huang.zhiping" Date: Wed, 15 Aug 2018 06:40:19 +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: I66b43b70c5ffd077e58e5a5f0e631bd3a0aa080a --- tox.ini | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tox.ini b/tox.ini index 0c7e4371..51fbc664 100644 --- a/tox.ini +++ b/tox.ini @@ -28,14 +28,17 @@ setenv = DJANGO_SETTINGS_MODULE=monitoring.test.settings [testenv:pep8] +basepython = python3 commands = /bin/bash run_tests.sh -N --pep8 python setup.py check --restructuredtext --strict [testenv:venv] +basepython = python3 commands = {posargs} [testenv:cover] +basepython = python3 commands = /bin/bash run_tests.sh -N --coverage {posargs} [flake8] @@ -44,6 +47,7 @@ builtins = _ exclude = .venv,.git,.tox,dist,*lib/python*,*egg,build,panel_template,dash_template,local_settings.py,*/local/*,*/test/test_plugins/* [testenv:lower-constraints] +basepython = python3 deps = -c{toxinidir}/lower-constraints.txt -r{toxinidir}/test-requirements.txt