oslo.utils/tox.ini
wangzihao e52d7b8b96 Changed minversion in tox to 3.18.0
The patch bumps min version of tox to 3.18.0 in order to
replace tox's whitelist_externals by allowlist_externals option:
https://github.com/tox-dev/tox/blob/master/docs/changelog.rst#v3180-2020-07-23

Change-Id: I475fe7eac69350e5438cda7310eddd1cb6db813e
2021-08-12 01:19:20 +00:00

52 lines
1.3 KiB
INI

[tox]
minversion = 3.18.0
envlist = py3,pep8
ignore_basepython_conflict = true
[testenv]
basepython = python3
deps =
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt
commands = stestr run --slowest {posargs}
[testenv:pep8]
commands =
pre-commit run -a
# Run security linter
bandit -r oslo_utils -x tests -n5
[testenv:venv]
commands = {posargs}
[testenv:docs]
allowlist_externals = rm
deps =
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/doc/requirements.txt
commands =
rm -fr doc/build
sphinx-build -W --keep-going -b html doc/source doc/build/html
[testenv:cover]
commands = python setup.py test --coverage --coverage-package-name=oslo_utils --testr-args='{posargs}'
[testenv:bandit]
commands = bandit -r oslo_utils -x tests -n5
[flake8]
# E731 skipped as assign a lambda expression
# W504 line break after binary operator
ignore = E123,E731,H405,W504
show-source = True
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,__init__.py
[testenv:releasenotes]
allowlist_externals = rm
deps =
{[testenv:docs]deps}
commands =
rm -rf releasenotes/build
sphinx-build -a -E -W -d releasenotes/build/doctrees --keep-going -b html releasenotes/source releasenotes/build/html