there's no reason to use eventlet for basic 'wait for true' function, all the tests are running syncronously one by one anyway (in separate worker processes at most), and merely importing eventlet can have some unexpected side-effects (for example [0]). [0] https://storyboard.openstack.org/#!/story/2010902 Change-Id: I9178d9acc8d88e2ddb8fba1111f12a5d2681e33e Signed-off-by: Pavlo Shchelokovskyy <shchelokovskyy@gmail.com>
77 lines
2.3 KiB
INI
77 lines
2.3 KiB
INI
[tox]
|
|
minversion = 3.18.0
|
|
envlist = pep8
|
|
|
|
[testenv]
|
|
usedevelop = True
|
|
setenv =
|
|
VIRTUAL_ENV={envdir}
|
|
PYTHONWARNINGS=default::DeprecationWarning
|
|
OS_LOG_CAPTURE={env:OS_LOG_CAPTURE:true}
|
|
OS_STDOUT_CAPTURE={env:OS_STDOUT_CAPTURE:true}
|
|
OS_STDERR_CAPTURE={env:OS_STDERR_CAPTURE:true}
|
|
deps =
|
|
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
|
-r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
commands = stestr run --slowest {posargs}
|
|
|
|
[testenv:pep8]
|
|
commands =
|
|
bash ./tools/misc-sanity-checks.sh
|
|
flake8
|
|
allowlist_externals =
|
|
bash
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[testenv:cover]
|
|
setenv =
|
|
{[testenv]setenv}
|
|
PYTHON=coverage run --source neutron_tempest_plugin --parallel-mode
|
|
commands =
|
|
stestr run --no-subunit-trace {posargs}
|
|
coverage combine
|
|
coverage html -d cover
|
|
coverage xml -o cover/coverage.xml
|
|
|
|
[testenv:docs]
|
|
deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
|
-r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/doc/requirements.txt
|
|
commands =
|
|
rm -rf doc/source/tests
|
|
sphinx-apidoc -f -o doc/source/tests neutron_tempest_plugin
|
|
rm -rf doc/build
|
|
sphinx-build -W -b html doc/source doc/build/html
|
|
allowlist_externals =
|
|
rm
|
|
|
|
[testenv:releasenotes]
|
|
deps = {[testenv:docs]deps}
|
|
commands =
|
|
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
|
|
|
[testenv:debug]
|
|
commands = oslo_debug_helper -t neutron_tempest_plugin/ {posargs}
|
|
|
|
[flake8]
|
|
# E126 continuation line over-indented for hanging indent
|
|
# E128 continuation line under-indented for visual indent
|
|
# E129 visually indented line with same indent as next logical line
|
|
# I202 Additional newline in a group of imports.
|
|
# N530 direct neutron imports not allowed
|
|
# N535 prevent eventlet library import
|
|
# W504 line break after binary operator
|
|
ignore = E126,E128,E129,I202,N530,W504
|
|
# H106: Don't put vim configuration in source files
|
|
# H203: Use assertIs(Not)None to check for None
|
|
# H204: Use assert(Not)Equal to check for equality
|
|
# H205: Use assert(Greater|Less)(Equal) for comparison
|
|
# H904: Delay string interpolations at logging calls
|
|
enable-extensions = H106,H203,H204,H205,H904
|
|
show-source = true
|
|
exclude = ./.*,build,dist,doc,*egg*,releasenotes
|
|
import-order-style = pep8
|