Create tox.ini file.
Configure with minimal requirements for running - pep8 - flake8 verifications py27/py35 - unittests Change-Id: If09bab1f0a8501afddd720cf9ea9335867072e1dchanges/92/595492/1
parent
dce03ca6ea
commit
0377537dc0
@ -0,0 +1,3 @@
|
||||
[DEFAULT]
|
||||
test_path=${OS_TEST_PATH:-./tobiko}
|
||||
top_dir=./
|
@ -0,0 +1,6 @@
|
||||
# The order of packages is significant, because pip processes them in the order
|
||||
# of appearance. Changing the order has an impact on the overall integration
|
||||
# process, which may cause wedges in the gate later.
|
||||
|
||||
flake8==2.5.5 # MIT
|
||||
flake8-import-order==0.12 # LGPLv3
|
@ -0,0 +1 @@
|
||||
mock >= 2.0 # BSD
|
@ -0,0 +1,63 @@
|
||||
[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}
|
||||
|
||||
passenv =
|
||||
|
||||
commands =
|
||||
stestr run {posargs}
|
||||
|
||||
deps =
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
|
||||
|
||||
[testenv:venv]
|
||||
basepython = python3
|
||||
|
||||
deps =
|
||||
|
||||
commands =
|
||||
{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
|
Loading…
Reference in New Issue