6148f9fb3b
This patch resolves the issue of tox failure. Change-Id: I565cd2593982a1b5c8c43cf394301c56e24b9b29 Closes-Bug: 1828511
47 lines
1.3 KiB
INI
47 lines
1.3 KiB
INI
[tox]
|
|
envlist = py35,py34,py27,pep8
|
|
|
|
[testenv]
|
|
usedevelop = True
|
|
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
PYTHONDONTWRITEBYTECODE = 1
|
|
LANGUAGE=en_US
|
|
LC_ALL=en_US.UTF-8
|
|
TESTS_DIR=./proliantutils/tests/
|
|
deps = -r{toxinidir}/test-requirements.txt
|
|
commands = stestr run {posargs}
|
|
|
|
[testenv:pep8]
|
|
basepython = python2.7
|
|
deps =
|
|
-r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
commands =
|
|
flake8 proliantutils
|
|
|
|
[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.
|
|
basepython = python2.7
|
|
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]
|
|
# Exclude MIB directories from flake8/pep8 tests as these are
|
|
# autogenerated files.
|
|
exclude = ./proliantutils/ilo/snmp/cpqdisk_mibs
|
|
max-complexity=15
|
|
|
|
[testenv:venv]
|
|
setenv = PYTHONHASHSEED=0
|
|
commands = {posargs}
|