Merge "fix tox python3 overrides"

This commit is contained in:
Zuul
2018-07-19 17:26:45 +00:00
committed by Gerrit Code Review
2 changed files with 8 additions and 1 deletions

View File

@@ -187,7 +187,7 @@ def print_list(objs, fields, exclude_unavailable=False, formatters=None,
def _encode(src): def _encode(src):
"""remove extra 'u' in PY2.""" """remove extra 'u' in PY2."""
if six.PY2 and isinstance(src, unicode): if six.PY2 and isinstance(src, six.text_type):
return src.encode('utf-8') return src.encode('utf-8')
return src return src

View File

@@ -24,9 +24,11 @@ commands = find . -type f -name "*.pyc" -delete
whitelist_externals = find whitelist_externals = find
[testenv:pep8] [testenv:pep8]
basepython = python3
commands = flake8 commands = flake8
[testenv:pylint] [testenv:pylint]
basepython = python3
deps = deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
-r{toxinidir}/requirements.txt -r{toxinidir}/requirements.txt
@@ -35,9 +37,11 @@ commands = bash tools/lintstack.sh
whitelist_externals = bash whitelist_externals = bash
[testenv:venv] [testenv:venv]
basepython = python3
commands = {posargs} commands = {posargs}
[testenv:cover] [testenv:cover]
basepython = python3
setenv = setenv =
{[testenv]setenv} {[testenv]setenv}
PYTHON=coverage run --source cinderclient --parallel-mode PYTHON=coverage run --source cinderclient --parallel-mode
@@ -48,6 +52,7 @@ commands =
coverage xml -o cover/coverage.xml coverage xml -o cover/coverage.xml
[testenv:docs] [testenv:docs]
basepython = python3
deps = deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
-r{toxinidir}/requirements.txt -r{toxinidir}/requirements.txt
@@ -55,6 +60,7 @@ deps =
commands = sphinx-build -b html doc/source doc/build/html commands = sphinx-build -b html doc/source doc/build/html
[testenv:releasenotes] [testenv:releasenotes]
basepython = python3
deps = deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
-r{toxinidir}/requirements.txt -r{toxinidir}/requirements.txt
@@ -62,6 +68,7 @@ deps =
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
[testenv:functional] [testenv:functional]
basepython = python3
commands = ostestr {posargs} commands = ostestr {posargs}
setenv = setenv =
{[testenv]setenv} {[testenv]setenv}