proliantutils/tox.ini

56 lines
1.6 KiB
INI

[tox]
minversion = 3.1.0
skipsdist = True
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]
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}