From 665666c031a577955642e96d7b3491336997cfa9 Mon Sep 17 00:00:00 2001 From: Doug Hellmann Date: Wed, 6 Jun 2018 15:27:01 -0400 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: I2a995f93b7e2a4a3ad40856773ce3ba7c6666720 Signed-off-by: Doug Hellmann Signed-off-by: Chuck Short Depends-on: Ia7412f8ec97cae2e0c8eda84eb38822a110c1a65 --- ovsdbapp/exceptions.py | 2 +- tox.ini | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ovsdbapp/exceptions.py b/ovsdbapp/exceptions.py index 19ac08e4..39665ea5 100644 --- a/ovsdbapp/exceptions.py +++ b/ovsdbapp/exceptions.py @@ -37,7 +37,7 @@ class OvsdbAppException(RuntimeError): if six.PY2: def __unicode__(self): - return unicode(self.msg) # noqa + return unicode(self.msg) # noqa pylint: disable=undefined-variable def __str__(self): return self.msg diff --git a/tox.ini b/tox.ini index d6f2b9ef..8984e1d2 100644 --- a/tox.ini +++ b/tox.ini @@ -17,24 +17,29 @@ deps = commands = stestr run --slowest {posargs} [testenv:pep8] -basepython = python2.7 +basepython = python3 commands = flake8 {toxinidir}/tools/coding-checks.sh --pylint '{posargs}' [testenv:venv] +basepython = python3 commands = {posargs} [testenv:cover] +basepython = python3 commands = python setup.py test --coverage --testr-args='{posargs}' [testenv:docs] +basepython = python3 commands = python setup.py build_sphinx [testenv:releasenotes] +basepython = python3 commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html [testenv:debug] +basepython = python3 commands = oslo_debug_helper {posargs} [testenv:functional]