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: Ib45159432550c6c15a29443d8c786e8f28c1d0c4 Signed-off-by: Doug Hellmann <doug@doughellmann.com> Co-Authored-By: Bartosz Zurkowski <b.zurkowski@samsung.com>
This commit is contained in:
parent
43d5fa5def
commit
dc7c4cdf3f
5
tox.ini
5
tox.ini
@ -17,9 +17,11 @@ commands = /bin/bash run_tests.sh -N --no-pep8 {posargs}
|
|||||||
setenv = DJANGO_SETTINGS_MODULE=trove_dashboard.test.settings
|
setenv = DJANGO_SETTINGS_MODULE=trove_dashboard.test.settings
|
||||||
|
|
||||||
[testenv:pep8]
|
[testenv:pep8]
|
||||||
|
basepython = python3
|
||||||
commands = flake8
|
commands = flake8
|
||||||
|
|
||||||
[testenv:venv]
|
[testenv:venv]
|
||||||
|
basepython = python3
|
||||||
commands = {posargs}
|
commands = {posargs}
|
||||||
|
|
||||||
[testenv:py35dj20]
|
[testenv:py35dj20]
|
||||||
@ -32,15 +34,18 @@ basepython = python2.7
|
|||||||
commands = /bin/bash run_tests.sh -N --integration --selenium-headless {posargs}
|
commands = /bin/bash run_tests.sh -N --integration --selenium-headless {posargs}
|
||||||
|
|
||||||
[testenv:cover]
|
[testenv:cover]
|
||||||
|
basepython = python3
|
||||||
commands = python setup.py testr --coverage --testr-args='{posargs}'
|
commands = python setup.py testr --coverage --testr-args='{posargs}'
|
||||||
|
|
||||||
[testenv:docs]
|
[testenv:docs]
|
||||||
|
basepython = python3
|
||||||
commands = python setup.py build_sphinx
|
commands = python setup.py build_sphinx
|
||||||
|
|
||||||
[testenv:debug]
|
[testenv:debug]
|
||||||
commands = oslo_debug_helper {posargs}
|
commands = oslo_debug_helper {posargs}
|
||||||
|
|
||||||
[testenv:releasenotes]
|
[testenv:releasenotes]
|
||||||
|
basepython = python3
|
||||||
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
||||||
|
|
||||||
[flake8]
|
[flake8]
|
||||||
|
@ -19,6 +19,7 @@ from django.utils.translation import ugettext_lazy as _
|
|||||||
from trove_dashboard import api
|
from trove_dashboard import api
|
||||||
|
|
||||||
from oslo_serialization import jsonutils
|
from oslo_serialization import jsonutils
|
||||||
|
from six.moves import builtins
|
||||||
|
|
||||||
|
|
||||||
def get(request, configuration_group_id):
|
def get(request, configuration_group_id):
|
||||||
@ -185,7 +186,7 @@ def adjust_type(data_type, value):
|
|||||||
if data_type == "float":
|
if data_type == "float":
|
||||||
new_value = float(value)
|
new_value = float(value)
|
||||||
elif data_type == "long":
|
elif data_type == "long":
|
||||||
new_value = long(value)
|
new_value = builtins.int(value)
|
||||||
elif data_type == "integer":
|
elif data_type == "integer":
|
||||||
new_value = int(value)
|
new_value = int(value)
|
||||||
else:
|
else:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user