387307a26c
python3.5 was the only supported python3 version on Xenial, now that we have Bionic Beaver nodes that support python3.7, lets switch to testing with python3.7 in addition with python3.6 in Stein and beyond. See ML discussion here [1] for context. [1] http://lists.openstack.org/pipermail/openstack-dev/2018-October/135632.html Change-Id: If1c57e2e13b6a5af5a0e05f1299e013a8c5386b8 Signed-off-by: Charles Short <chucks@redhat.com> Story: #2004073 Task: #27433
93 lines
2.5 KiB
INI
93 lines
2.5 KiB
INI
[tox]
|
||
minversion = 2.0
|
||
envlist = py37,py27,pep8
|
||
skipsdist = True
|
||
|
||
[testenv]
|
||
usedevelop = True
|
||
install_command = pip install -U {opts} {packages}
|
||
setenv =
|
||
VIRTUAL_ENV={envdir}
|
||
CONSTRAINTS_OPT=-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
|
||
deps =
|
||
{env:CONSTRAINTS_OPT}
|
||
-r{toxinidir}/requirements.txt
|
||
-r{toxinidir}/test-requirements.txt
|
||
whitelist_externals = bash
|
||
commands = stestr run --black-regex ".tests.functional" {posargs}
|
||
|
||
[testenv:pep8]
|
||
basepython = python3
|
||
commands = flake8
|
||
|
||
[testenv:venv]
|
||
basepython = python3
|
||
commands = {posargs}
|
||
deps =
|
||
{env:CONSTRAINTS_OPT}
|
||
-r{toxinidir}/requirements.txt
|
||
-r{toxinidir}/test-requirements.txt
|
||
-r{toxinidir}/doc/requirements.txt
|
||
|
||
[testenv:functional]
|
||
basepython = python2.7
|
||
setenv =
|
||
{[testenv]setenv}
|
||
commands =
|
||
stestr run --black-regex ".tests.unit" '{posargs}'
|
||
|
||
[testenv:docs]
|
||
basepython = python3
|
||
deps =
|
||
{env:CONSTRAINTS_OPT}
|
||
-r{toxinidir}/doc/requirements.txt
|
||
commands = sphinx-build -W -b html doc/source doc/build/html
|
||
|
||
[testenv:releasenotes]
|
||
basepython = python3
|
||
deps =
|
||
{env:CONSTRAINTS_OPT}
|
||
-r{toxinidir}/doc/requirements.txt
|
||
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
||
|
||
[testenv:lower-constraints]
|
||
basepython = python3
|
||
deps =
|
||
-c{toxinidir}/lower-constraints.txt
|
||
-r{toxinidir}/requirements.txt
|
||
-r{toxinidir}/test-requirements.txt
|
||
-r{toxinidir}/doc/requirements.txt
|
||
commands =
|
||
stestr run --black-regex ".tests.functional" {posargs}
|
||
sphinx-build -W doc/source doc/build
|
||
|
||
[flake8]
|
||
# E123, E125 skipped as they are invalid PEP-8.
|
||
# Following checks are ignored on purpose.
|
||
#
|
||
# E251 unexpected spaces around keyword / parameter equals
|
||
# reason: no improvement in readability
|
||
#
|
||
# E265 block comment should start with '# '
|
||
# reason: no improvement in readability
|
||
#
|
||
# H904 wrap long lines in parentheses instead of a backslash
|
||
# reason: removed in hacking (https://review.openstack.org/#/c/101701/)
|
||
#
|
||
# H404 skipped on purpose per jay pipes discussion.
|
||
#
|
||
# Due to the upgrade to hacking 0.9.2 the following checking are
|
||
# ignored on purpose for the moment and should be re-enabled.
|
||
# H106: Don’t put vim configuration in source files
|
||
# H203: Use assertIs(Not)None to check for None
|
||
|
||
show-source = True
|
||
ignore = E123,E125,E126,E127,E128,E251,E265,H302,H405,H904,H404
|
||
enable-extensions=H106,H203
|
||
builtins = _
|
||
exclude=.venv,.git,.tox,dist,*lib/python*,*egg,build
|
||
max-complexity=30
|
||
|
||
[hacking]
|
||
import_exceptions = os_vif.i18n
|