
Let separate test cases (tobiko.tests package) from framework (the rest of tobiko). - Move test case dependencies to test-requirements.txt file. - Keep only requirements.txt as framework requirements file. - Add python-networkclient dependency to tobiko framework - update tox.ini to use it for checking code before committing it Change-Id: I0bc433153e00a1c83dbf691bfe058a1ccb1a49dd
62 lines
1.5 KiB
INI
62 lines
1.5 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=default::DeprecationWarning,{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}
|
|
|
|
commands =
|
|
stestr run {posargs}
|
|
|
|
deps =
|
|
-r{toxinidir}/test-requirements.txt
|
|
|
|
|
|
[testenv:venv]
|
|
basepython = python3
|
|
|
|
deps =
|
|
|
|
commands =
|
|
/bin/bash {posargs}
|
|
|
|
|
|
[testenv:pep8]
|
|
basepython = python3
|
|
|
|
deps =
|
|
-r{toxinidir}/pep8-requirements.txt
|
|
|
|
commands =
|
|
flake8
|
|
|
|
[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
|