From c8ed1be3e4467ba62c7f30c035ca58dd29e1e75e Mon Sep 17 00:00:00 2001 From: "huang.zhiping" Date: Fri, 8 Jun 2018 14:10:31 +0800 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: If6edee698b2a4f0ba5afc13e89462d3b38d753e1 --- tox.ini | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tox.ini b/tox.ini index fac67de..f81c88b 100644 --- a/tox.ini +++ b/tox.ini @@ -4,6 +4,7 @@ envlist = pypy,py35,py27,pep8,docs skipsdist = True [testenv] +basepython = python3 usedevelop = True install_command = pip install -U {opts} {packages} setenv = @@ -18,6 +19,7 @@ commands = coverage erase [testenv:docs] +basepython = python3 deps = doc8 sphinx @@ -26,21 +28,25 @@ commands = doc8 --allow-long-titles doc/source [testenv:pep8] +basepython = python3 commands = flake8 {posargs} anchor flake8 {posargs} tests bandit -r anchor [testenv:venv] +basepython = python3 commands = {posargs} [testenv:cover] +basepython = python3 commands = python setup.py testr --coverage --testr-args='{posargs}' coverage combine coverage xml [testenv:bandit] +basepython = python3 deps = -r{toxinidir}/test-requirements.txt commands = bandit -r anchor