python-ironic-inspector-client/tox.ini
Riccardo Pittau d53c27efae Set min version of tox to 3.2.1
As recommended, since version 3.2.0 tox switches pip invocations
to use the module -m pip instead of direct invocation.
We set min version to 3.2.1 [1] to also fix the behavior of
--parallel--safe-build

[1] https://tox.readthedocs.io/en/latest/changelog.html#v3-2-1-2018-08-10

Change-Id: I40f55794e416f456f1f3140ad69e9ec756be0c9b
2020-07-15 15:32:29 +02:00

106 lines
3.5 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]
minversion = 3.2.1
envlist = py3,pep8,functional-py3
ignore_basepython_conflict=true
[testenv]
basepython = python3
install_command = pip install {opts} {packages}
usedevelop = True
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands =
coverage run --branch --include "ironic_inspector_client*" -m unittest discover ironic_inspector_client.test
coverage report -m --fail-under 90
setenv = PYTHONDONTWRITEBYTECODE=1
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
[testenv:pep8]
commands =
flake8 ironic_inspector_client
doc8 README.rst doc/source
[testenv:functional-py3]
deps = {[testenv]deps}
-r{toxinidir}/functest-requirements.txt
commands =
python -m ironic_inspector_client.test.functional {posargs}
[testenv:functional-py36]
basepython = python3.6
deps = {[testenv:functional-py3]deps}
commands = {[testenv:functional-py3]commands}
[testenv:func]
# Replaced in CI with "functional" environment but kept here as a
# backwards-compatibility shim for transition
deps = {[testenv:functional-py3]deps}
commands = {[testenv:functional-py3]commands}
[testenv:venv]
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/requirements.txt
-r{toxinidir}/doc/requirements.txt
commands = {posargs}
[testenv:releasenotes]
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/requirements.txt
-r{toxinidir}/doc/requirements.txt
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[testenv:docs]
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/requirements.txt
-r{toxinidir}/doc/requirements.txt
commands = sphinx-build -W -b html doc/source doc/build/html
[testenv:pdf-docs]
whitelist_externals = make
deps = {[testenv:docs]deps}
commands =
sphinx-build -W -b latex doc/source doc/build/pdf
make -C doc/build/pdf
[flake8]
# [E741] ambiguous variable name
# [W503] Line break before binary operator.
ignore = E741,W503
exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build
import-order-style = pep8
application-import-names = ironic_inspector_client
max-complexity=15
# [H106] Don't put vim configuration in source files.
# [H203] Use assertIs(Not)None to check for None.
# [H204] Use assert(Not)Equal to check for equality.
# [H205] Use assert(Greater|Less)(Equal) for comparison.
# [H210] Require autospec, spec, or spec_set in mock.patch/mock.patch.object calls
# [H904] Delay string interpolations at logging calls.
enable-extensions=H106,H203,H204,H205,H210,H904
per-file-ignores =
ironic_inspector_client/test/functional.py:E402
[hacking]
import_exceptions = ironic_inspector_client.common.i18n
[testenv:lower-constraints]
deps =
-c{toxinidir}/lower-constraints.txt
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt
# This environment can be used to quickly validate that all needed system
# packages required to successfully execute test targets are installed
[testenv:bindep]
# Do not install any requirements. We want this to be fast and work even if
# system dependencies are missing, since it's used to tell you what system
# dependencies are missing! This also means that bindep must be installed
# separately, outside of the requirements files.
deps = bindep
commands = bindep test