Files
python-zaqarclient/tox.ini
Takashi Kajinami 43c1571fe7 Use pre-commit for pep8 checks
pre-commit was introduced in several repos and is known to be useful.
It allows us to easily add more checks.

Change-Id: I8bfbd0abbf2ad825716331833fb6ab68a1e61dfd
Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
2025-10-12 00:10:56 +09:00

60 lines
1.4 KiB
INI

[tox]
minversion = 3.18.0
envlist = py3,pep8
[testenv]
usedevelop = True
setenv = VIRTUAL_ENV={envdir}
OS_STDOUT_CAPTURE=1
OS_STDERR_CAPTURE=1
OS_TEST_TIMEOUT=60
deps =
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands = find . -type f -name "*.pyc" -delete
stestr run {posargs}
allowlist_externals = find
[testenv:pep8]
skip_install = true
deps =
pre-commit
commands =
pre-commit run -a
[testenv:cover]
setenv = {[testenv]setenv}
PYTHON=coverage run --source zaqarclient --parallel-mode
commands =
stestr -q run {posargs}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
[testenv:functional]
setenv =
OS_TEST_PATH = ./tests/functional
ZAQARCLIENT_AUTH_FUNCTIONAL = 1
ZAQARCLIENT_TEST_FUNCTIONAL = 1
passenv =
ZAQAR_SERVICE_HOST
ZAQAR_ENDPOINT
[testenv:venv]
commands = {posargs}
[testenv:docs]
deps = -r{toxinidir}/doc/requirements.txt
commands = sphinx-build -W -b html doc/source doc/build/html
[testenv:releasenotes]
deps = -r{toxinidir}/doc/requirements.txt
commands = sphinx-build -a -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[flake8]
builtins = _
exclude = .venv,.git,.tox,dist,doc,*.egg
# W504 line break after binary operator
ignore = W504