nfv/tox.ini

116 lines
3.7 KiB
INI
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[tox]
envlist = linters,pep8,py27,pylint
minversion = 2.3
skipsdist = True
[testenv]
basepython = python3
install_command = pip install -U {opts} {packages}
setenv = VIRTUAL_ENV={envdir}
OS_STDOUT_CAPTURE=1
OS_STDERR_CAPTURE=1
OS_TEST_TIMEOUT=60
PYTHONDONTWRITEBYTECODE=True
commands = find {toxinidir} -type f -not -path '{toxinidir}/.tox/*' -not -path '*/__pycache__/*' -name '*.py[c|o]' -delete
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
[testenv:linters]
whitelist_externals = bash
commands =
bash -c "find {toxinidir} \
\( -name middleware/io-monitor/recipes-common/io-monitor/io-monitor/io_monitor/test-tools/yaml/* -prune \) \
-o \( -name .tox -prune \) \
-o -type f -name '*.yaml' \
-print0 | xargs -0 yamllint"
[flake8]
# Temporarily ignoring these warnings
# E116 unexpected indentation (comment)
# E121 continuation line under-indented for hanging indent
# E122 continuation line missing indentation or outdented
# E123 closing bracket does not match indentation of opening bracket
# E124 closing bracket does not match visual indentation
# E126 continuation line over-indented for hanging indent
# E127 continuation line over-indented for visual indent
# E128 continuation line under-indented for visual indent
# E129 visually indented line with same indent as next logical line
# E261 at least two spaces before inline comment
# E265 block comment should start with '# '
# E501 line too long
# E712 comparison to bool should be reworded
# - hacking codes -
# H102: license header not found
# H104: File contains nothing but comments
# H301: one import per line
# H306: imports not in alphabetical order
# H401: docstring should not start with a space
# H404: multi line docstring should start without a leading new line
# H405: multi line docstring summary not separated with an empty line
# H501: Do not use self.__dict__ for string formatting
# - flake8 codes -
# F401 '<module>' imported but unused
# F821 undefined name 'unicode' (python3 specific)
ignore = E116,E121,E122,E123,E124,E126,E127,E128,E129,E261,E265,E501,E712,
H102,H104,H301,H306,H401,H404,H405,H501,
F401,F821,
# H106 Dont put vim configuration in source files (off by default).
# H203 Use assertIs(Not)None to check for None (off by default).
# TODO: enable: H904 Delay string interpolations at logging calls (off by default).
enable-extensions = H106,H203
[testenv:pep8]
usedevelop = False
skip_install = True
deps =
hacking
flake8
commands =
flake8
[testenv:venv]
commands = {posargs}
[nosetests]
verbosity=2
[testenv:py27]
basepython = python2.7
deps = {[testenv]deps}
{toxinidir}/nfv/nfv-client
{toxinidir}/nfv/nfv-common
{toxinidir}/nfv/nfv-plugins
{toxinidir}/nfv/nfv-vim
whitelist_externals = cp
find
recreate = True
commands = {[testenv]commands}
cp -v nfv/nfv-tests/nfv_unit_tests/test_data/nfv_vim_db_18.03_GA {envdir}/
nosetests --exe -w nfv/nfv-tests/nfv_unit_tests/tests/ '{posargs}'
[testenv:pylint]
basepython = python2.7
deps = {[testenv]deps}
{toxinidir}/nfv/nfv-client
{toxinidir}/nfv/nfv-common
{toxinidir}/nfv/nfv-plugins
{toxinidir}/nfv/nfv-vim
{toxinidir}/../stx-fault/fm-api
iso8601
keyring
kombu
kubernetes
passlib
pecan
pyparsing
wsme
pylint
whitelist_externals = cp
find
commands = pylint nfv/nfv-client/nfv_client \
nfv/nfv-common/nfv_common \
nfv/nfv-plugins/nfv_plugins \
nfv/nfv-vim/nfv_vim \
--rcfile=nfv/nfv-tests/nfv_unit_tests/pylint.rc