proliantutils/tox.ini
Jay Faulkner fe2f9c2950 Do not break on sushy.connector.Connector sig change
Right now, retries break in ilo driver due to server_side_retries being
an accepted kwarg in sushy.connector.Connector._op, but not this
version.

We should accept any set of args, but only pass on known-good args, as
sushy.connector.Connector._op() will pass on any unknown kwargs to
requests, which means we should not blindly pass on all kwargs.

Additionally, fixed related unit tests and some basic configuration
fixes to get linting to pass.

Change-Id: I80796cc4280a194735e6e4034d37cca4fdc97f97
2024-06-26 09:15:25 -07:00

67 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 # Apache-2.0
flake8-import-order # LGPLv3
pycodestyle # MIT
Pygments # 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.
# [E275] missing whitespace after keyword
# [E731] do not assign a lambda expression, use a def
# [W503] Line break occurred before a binary operator. Conflicts with W504.
ignore = C901,E275,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}