tobiko/tox.ini
Federico Ressi 13d511e954 Allow pylint to execute paralled processes to speedup execution.
Change-Id: I0a12dba1fc6ab433153ec7766b9beb5c8318c79b
2019-04-11 12:28:55 +02:00

147 lines
3.2 KiB
INI

[tox]
envlist = pep8,pylint,py36,py27
minversion = 2.0
[tobiko]
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
-r{toxinidir}/requirements.txt
-r{toxinidir}/extra-requirements.txt
setenv =
VIRTUAL_ENV={envdir}
PYTHONWARNINGS=ignore::Warning,{env:PYTHONWARNINGS:}
OS_LOG_CAPTURE={env:OS_LOG_CAPTURE:true}
OS_STDOUT_CAPTURE={env:OS_STDOUT_CAPTURE:true}
OS_STDERR_CAPTURE={env:OS_STDERR_CAPTURE:true}
[testenv]
commands =
find . -type f -name ".coverage*" -delete
find . -type f -name "*.pyc" -delete
coverage erase
stestr --test-path ./tobiko/tests run --black-regex 'scenario' {posargs}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
coverage report
find . -type f -name ".coverage*" -delete
deps =
{[tobiko]deps}
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/extra-requirements.txt
setenv =
{[tobiko]setenv}
PYTHON=coverage run --source tobiko --parallel-mode
usedevelop = True
whitelist_externals=
find
[testenv:neutron]
commands =
stestr --test-path ./tobiko/tests/scenario/neutron run {posargs}
deps =
{[tobiko]deps}
-r{toxinidir}/neutron-requirements.txt
setenv =
{[tobiko]setenv}
PYTHON=python
passenv =
http_proxy
https_proxy
no_proxy
OS_USER_DOMAIN_NAME
OS_IMAGE_API_VERSION
OS_PROJECT_NAME
OS_IDENTITY_API_VERSION
OS_PASSWORD
OS_AUTH_TYPE
OS_AUTH_URL
OS_USERNAME
OS_VOLUME_API_VERSION
OS_NO_CACHE
OS_CLOUDNAME
OS_PROJECT_DOMAIN_NAME
[testenv:venv]
basepython = python3
commands =
{posargs}
deps =
{[testenv]deps}
{[testenv:neutron]deps}
setenv =
{[tobiko]setenv}
PYTHON=python
[testenv:pep8]
basepython = python3
commands =
flake8
deps =
{[testenv]deps}
{[testenv:neutron]deps}
-r{toxinidir}/pep8-requirements.txt
setenv =
{[tobiko]setenv}
PYTHON=python
[testenv:pylint]
basepython = python3
commands =
pylint -j0 -E --rcfile=.pylintrc -e W,E tobiko
deps =
{[testenv]deps}
{[testenv:neutron]deps}
-r{toxinidir}/pylint-requirements.txt
setenv =
{[tobiko]setenv}
PYTHON=python
[testenv:releasenotes]
basepython = python3
deps = -r{toxinidir}/docs/requirements.txt
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[flake8]
# E125 continuation line does not distinguish itself from next logical line
# 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
# E265 block comment should start with '# '
# H404 multi line docstring should start with a summary
# H405 multi line docstring summary not separated with an empty line
# N530 direct neutron imports not allowed
ignore = E125,E126,E128,E129,E265,H404,H405,N530
# H106: Don't put vim configuration in source files
# H203: Use assertIs(Not)None to check for None
# H904: Delay string interpolations at logging calls
enable-extensions = H106,H203,H904
show-source = true
exclude = ./.*,build,dist,doc,*egg*,releasenotes
import-order-style = pep8