4af5ede78b
Change-Id: Iee79f1d26e1db5538c8ed265bcb0889bca4552a8
128 lines
2.7 KiB
INI
128 lines
2.7 KiB
INI
[tox]
|
|
envlist = pep8,pylint,py35,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
|
|
|
|
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/cmd run {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
|
|
|
|
setenv =
|
|
{[tobiko]setenv}
|
|
PYTHON=coverage run --source tobiko --parallel-mode
|
|
|
|
usedevelop = True
|
|
|
|
whitelist_externals=
|
|
find
|
|
|
|
|
|
[testenv:neutron]
|
|
basepython = python3
|
|
|
|
commands =
|
|
tobiko-delete --all
|
|
tobiko-create --all
|
|
stestr --test-path ./tobiko/tests/scenario run {posargs}
|
|
|
|
deps =
|
|
{[tobiko]deps}
|
|
-r{toxinidir}/neutron-requirements.txt
|
|
|
|
setenv =
|
|
{[tobiko]setenv}
|
|
PYTHON=python
|
|
|
|
|
|
[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 -E --rcfile=.pylintrc -e W,E tobiko
|
|
|
|
deps =
|
|
{[testenv]deps}
|
|
{[testenv:neutron]deps}
|
|
-r{toxinidir}/pylint-requirements.txt
|
|
|
|
setenv =
|
|
{[tobiko]setenv}
|
|
PYTHON=python
|
|
|
|
|
|
[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
|