2016-07-15 14:24:49 +07:00
|
|
|
[tox]
|
2021-07-06 16:31:28 +08:00
|
|
|
minversion = 3.18.0
|
2021-04-20 03:21:50 +00:00
|
|
|
envlist = py3,pep8
|
2019-12-30 12:41:22 +02:00
|
|
|
ignore_basepython_conflict = True
|
2016-07-15 14:24:49 +07:00
|
|
|
|
|
|
|
[testenv]
|
2019-12-30 12:41:22 +02:00
|
|
|
basepython = python3
|
2016-07-15 14:24:49 +07:00
|
|
|
usedevelop = True
|
2017-04-19 10:05:11 +01:00
|
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
|
|
PYTHONDONTWRITEBYTECODE = 1
|
|
|
|
PYTHONWARNINGS=default::DeprecationWarning
|
2023-01-09 13:24:25 -06:00
|
|
|
passenv =
|
|
|
|
http_proxy
|
|
|
|
HTTP_PROXY
|
|
|
|
https_proxy
|
|
|
|
HTTPS_PROXY
|
|
|
|
no_proxy
|
|
|
|
NO_PROXY
|
2017-12-02 07:24:24 +01:00
|
|
|
deps =
|
2019-06-19 22:32:34 +08:00
|
|
|
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
2017-12-02 07:24:24 +01:00
|
|
|
-r{toxinidir}/test-requirements.txt
|
|
|
|
-r{toxinidir}/requirements.txt
|
2017-04-19 10:05:11 +01:00
|
|
|
commands =
|
|
|
|
find . -type f -name "*.pyc" -delete
|
2018-05-21 18:35:26 -04:00
|
|
|
stestr run --slowest {posargs}
|
2021-07-06 16:31:28 +08:00
|
|
|
allowlist_externals =
|
2017-04-19 10:05:11 +01:00
|
|
|
rm
|
|
|
|
find
|
2016-07-15 14:24:49 +07:00
|
|
|
|
|
|
|
[testenv:pep8]
|
2018-06-07 12:12:17 +01:00
|
|
|
commands =
|
2020-01-15 16:48:50 +02:00
|
|
|
doc8 doc/source
|
2018-06-07 12:12:17 +01:00
|
|
|
flake8 {posargs}
|
2016-07-15 14:24:49 +07:00
|
|
|
|
|
|
|
[testenv:venv]
|
|
|
|
commands = {posargs}
|
|
|
|
|
|
|
|
[testenv:cover]
|
2018-05-21 18:35:26 -04:00
|
|
|
setenv =
|
|
|
|
PYTHON=coverage run --source $project --parallel-mode
|
|
|
|
commands =
|
2018-10-09 21:07:32 +00:00
|
|
|
stestr run {posargs}
|
2018-05-21 18:35:26 -04:00
|
|
|
coverage combine
|
|
|
|
coverage html -d cover
|
|
|
|
coverage xml -o cover/coverage.xml
|
2016-07-15 14:24:49 +07:00
|
|
|
|
|
|
|
[testenv:docs]
|
2020-01-15 16:48:50 +02:00
|
|
|
deps = -r{toxinidir}/doc/requirements.txt
|
|
|
|
setenv = PYTHONHASHSEED=0
|
|
|
|
commands =
|
|
|
|
rm -rf doc/build
|
|
|
|
sphinx-build -E -W --keep-going -b html doc/source doc/build/html
|
2016-07-15 14:24:49 +07:00
|
|
|
|
|
|
|
[testenv:releasenotes]
|
|
|
|
commands =
|
2019-10-24 21:10:08 +08:00
|
|
|
rm -rf releasenotes/build
|
|
|
|
sphinx-build -a -E -W -d releasenotes/build/doctrees --keep-going -b html releasenotes/source releasenotes/build/html
|
2016-07-15 14:24:49 +07:00
|
|
|
|
|
|
|
[testenv:debug]
|
2021-07-06 16:31:28 +08:00
|
|
|
allowlist_externals = oslo_debug_helper
|
2017-03-07 15:39:02 +05:30
|
|
|
commands = oslo_debug_helper -t mistral_lib/tests {posargs}
|
2016-07-15 14:24:49 +07:00
|
|
|
|
2020-01-15 16:48:50 +02:00
|
|
|
[doc8]
|
|
|
|
extensions = .rst, .yaml, .mistral
|
|
|
|
# Maximal line length should be 80.
|
|
|
|
max-line-length = 80
|
|
|
|
|
2016-07-15 14:24:49 +07:00
|
|
|
[flake8]
|
|
|
|
# E123, E125 skipped as they are invalid PEP-8.
|
|
|
|
show-source = True
|
2020-01-07 14:58:46 +02:00
|
|
|
ignore = E123,E125,W504
|
2016-07-15 14:24:49 +07:00
|
|
|
builtins = _
|
|
|
|
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
|