proliantutils/tox.ini

66 lines
1.7 KiB
INI

[tox]
minversion = 3.18.0
envlist = py3,pep8
ignore_basepython_conflict=true
[testenv]
basepython = python3
usedevelop = True
setenv = VIRTUAL_ENV={envdir}
PYTHONDONTWRITEBYTECODE = 1
LANGUAGE=en_US
LC_ALL=en_US.UTF-8
PYTHONWARNINGS=default::DeprecationWarning
TESTS_DIR=./proliantutils/tests/
deps =
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands =
stestr run {posargs}
passenv =
http_proxy
HTTP_PROXY
https_proxy
HTTPS_PROXY
no_proxy
NO_PROXY
[testenv:pep8]
deps =
hacking>=4.1.0,<5.0.0 # Apache-2.0
flake8-import-order>=0.17.1 # LGPLv3
pycodestyle>=2.0.0,<3.0.0 # MIT
Pygments>=2.2.0 # BSD
commands = flake8 {posargs}
[testenv:cover]
# After running this target, visit proliantutils/cover/index.html
# in your browser, to see a nicer presentation report with annotated
# HTML listings detailing missed lines.
setenv = VIRTUAL_ENV={envdir}
LANGUAGE=en_US
PYTHON=coverage run --source proliantutils --omit='*tests*' --parallel-mode
commands =
coverage erase
stestr run {posargs}
coverage combine
coverage report --omit='*tests*'
coverage html -d ./cover --omit='*tests*'
[flake8]
show-source = True
# [C901] function is too complex.
# [E731] do not assign a lambda expression, use a def
# [W503] Line break occurred before a binary operator. Conflicts with W504.
ignore = C901,E731,W503
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,*cpqdisk_mibs
max-complexity=15
import-order-style = pep8
application-import-names = proliantutils
filename = *.py
[testenv:venv]
setenv = PYTHONHASHSEED=0
commands = {posargs}