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: Ib660c909b6b7afeb8edc6b802d5e6897d72f7980
This commit is contained in:
huang.zhiping 2018-06-09 11:02:29 +08:00 committed by Hisashi Osanai
parent 6c7316ebbd
commit f3480a7bda
1 changed files with 3 additions and 1 deletions

View File

@ -1,7 +1,7 @@
[tox]
minversion = 2.0
skipsdist = True
envlist = py27,pep8,cover
envlist = py27,py35,pep8,cover
[testenv]
usedevelop = True
@ -20,6 +20,7 @@ commands =
nosetests -w test
[testenv:cover]
basepython = python3
commands = nosetests -w test --cover-package monasca_analytics
setenv = VIRTUAL_ENV={envdir}
NOSE_WITH_COVERAGE=1
@ -38,6 +39,7 @@ commands =
[testenv:docs]
[testenv:venv]
basepython = python3
install_command = pip install -U {opts} {packages}
commands = {posargs}