From 99e52b0598ee516eed84df40432c2ae41e83ed8d Mon Sep 17 00:00:00 2001 From: "huang.zhiping" Date: Fri, 8 Jun 2018 13:42:18 +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: I6e873ea38b4483ea477afcb8925fb8e60d65b60f --- tox.ini | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tox.ini b/tox.ini index 793a671..8017bb3 100644 --- a/tox.ini +++ b/tox.ini @@ -3,6 +3,7 @@ envlist = py27,py35,pep8,cover_report skipsdist = True [testenv] +basepython = python3 usedevelop = True deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt @@ -10,28 +11,34 @@ commands = adjutant-api test {posargs} setenv = VIRTUAL_ENV={envdir} [testenv:pep8] +basepython = python3 commands = flake8 [testenv:cover] +basepython = python3 commands = coverage run --source='adjutant' .tox/cover/bin/adjutant-api test {posargs} coverage html -d cover coverage xml -o cover/coverage.xml [testenv:cover_report] +basepython = python3 commands = coverage run --source='.' .tox/cover_report/bin/adjutant-api test {posargs} coverage report --include adjutant/* -m [testenv:venv] +basepython = python3 commands = {posargs} [testenv:docs] +basepython = python3 commands = doc8 doc/source python setup.py build_sphinx [testenv:api-ref] +basepython = python3 commands = doc8 api-ref/source python setup.py build_sphinx -s api-ref/source/ --build-dir api-ref/build/