tobiko/tox.ini

75 lines
1.9 KiB
INI

[tox]
minversion = 2.0
envlist = pep8,py35,py27
[testenv]
usedevelop = True
install_command =
pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
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}
PYTHON=coverage run --source tobiko --parallel-mode
whitelist_externals=
find
commands =
coverage erase
find . -type f -name "*.pyc" -delete
stestr --test-path ./tobiko/tests run {posargs}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
coverage report
deps =
-r{toxinidir}/test-requirements.txt
[testenv:venv]
basepython = python3
deps =
commands =
/bin/bash {posargs}
[testenv:pep8]
basepython = python3
deps =
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/pep8-requirements.txt
commands =
flake8
pylint -E --rcfile=.pylintrc -e W,E tobiko
[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