python-manilaclient/tox.ini

120 lines
3.0 KiB
INI

[tox]
distribute = False
envlist = py27,py37,pep8
minversion = 2.0
skipsdist = True
[testenv]
install_command = pip install {opts} {packages}
setenv = VIRTUAL_ENV={envdir}
OS_STDOUT_CAPTURE=1
OS_STDERR_CAPTURE=1
whitelist_externals = find
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands =
find . -type f -name "*.pyc" -delete
stestr run {posargs}
stestr slowest
[testenv:debug]
basepython = python3
commands = oslo_debug_helper -t manilaclient/tests {posargs}
[testenv:debug-py27]
basepython = python2.7
commands = oslo_debug_helper -t manilaclient/tests {posargs}
[testenv:pep8]
basepython = python3
commands =
flake8
[testenv:venv]
basepython = python3
commands = {posargs}
[testenv:docs]
usedevelop = True
basepython = python3
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}
-r{toxinidir}/requirements.txt
-r{toxinidir}/doc/requirements.txt
whitelist_externals = rm
commands =
rm -rf doc/build
sphinx-build -b html doc/source doc/build/html
[testenv:pdf-docs]
usedevelop = True
basepthon = python3
deps = {[testenv:docs]deps}
whitelist_externals =
make
commands =
sphinx-build -W -b latex doc/source doc/build/pdf
make -C doc/build/pdf
[testenv:releasenotes]
basepython = python3
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}
-r{toxinidir}/requirements.txt
-r{toxinidir}/doc/requirements.txt
whitelist_externals = rm
commands =
rm -rf releasenotes/build
sphinx-build -a -E -W -d releasenotes/build/doctrees \
-b html releasenotes/source releasenotes/build/html
[testenv:functional]
basepython = python3
setenv =
{[testenv]setenv}
OS_TEST_PATH = ./manilaclient/tests/functional
OS_SHARE_API_VERSION = 2
passenv = OS_*
commands =
{envdir}/bin/python setup.py install
stestr run {posargs}
[testenv:genconfig]
basepython = python3
whitelist_externals = bash
commands =
{envdir}/bin/python setup.py install
{envdir}/bin/oslo-config-generator --config-file etc/oslo-config-generator/manilaclient.conf
[testenv:cover]
basepython = python3
setenv =
{[testenv]setenv}
PYTHON=coverage run --source manilaclient --parallel-mode
commands =
stestr run {posargs}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
coverage report
[flake8]
# F821: undefined name
ignore = F821
builtins = _
# [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
exclude = .venv,.tox,dist,doc,*egg,build
[testenv:lower-constraints]
basepython = python3
deps =
-c{toxinidir}/lower-constraints.txt
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt