cb1b85b13f
Added a python3 tool called bugbear as part of flake8 Moved the tox.ini for nfv to a new location. Removed nfv tox calls from the bottom level tox.ini file Specified the queens upper-constraint. This is because the kubernetes client from pike is not what is shipped. Adds a separate tox.ini for nova-api-proxy. Fix two of the errors flagged by bugbear: B006: Do not use mutable data structures for argument defaults. B306: BaseException.message has been deprecated as of Python 2.6 and is removed in Python 3. Fix unused imports in Flake8 F401 '<module>' imported but unused Clean up two pylint errors: W0102 dangerous-default-value W0631 undefined-loop-variable Story: 2003499 Task: 26410 Change-Id: I61deb6a002f963cd58fe019bb54a4c3296809391 Signed-off-by: Al Bailey <Al.Bailey@windriver.com>
38 lines
1.1 KiB
INI
38 lines
1.1 KiB
INI
[tox]
|
|
envlist = linters
|
|
minversion = 2.3
|
|
skipsdist = True
|
|
|
|
[testenv]
|
|
basepython = python3
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
OS_STDOUT_CAPTURE=1
|
|
OS_STDERR_CAPTURE=1
|
|
OS_TEST_TIMEOUT=60
|
|
PYTHONDONTWRITEBYTECODE=True
|
|
install_command = pip install -U {opts} {packages}
|
|
commands = find {toxinidir} -type f -not -path '{toxinidir}/.tox/*' -not -path '*/__pycache__/*' -name '*.py[c|o]' -delete
|
|
deps = -r{toxinidir}/test-requirements.txt
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[testenv:flake8]
|
|
description = Dummy environment to allow flake8 to be run in subdir tox
|
|
|
|
[testenv:pep8]
|
|
description = Dummy environment to allow pep8 to be run in subdir tox
|
|
|
|
[testenv:pylint]
|
|
description = Dummy environment to allow pylint to be run in subdir tox
|
|
|
|
[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"
|
|
|