pyghmi/tox.ini
Jarrod Johnson 0e038cfa12 Remove 2.7 from test
It seems to be not well supported in the test pipeline anywhere.

Change-Id: I931dfdb80bdf348e785b62cce26d7ad5e54e9372
2021-04-05 16:56:16 -04:00

65 lines
1.8 KiB
INI

[tox]
minversion = 3.9.0
envlist = py3,pep8
skipsdist = True
ignore_basepython_conflict=true
[testenv]
basepython = python3
setenv = VIRTUAL_ENV={envdir}
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_ALL=C
TESTS_DIR=./pyghmi/tests/unit/
OS_LOG_CAPTURE={env:OS_LOG_CAPTURE:true}
OS_STDOUT_CAPTURE={env:OS_STDOUT_CAPTURE:true}
OS_STDERR_CAPTURE={env:OS_STDERR_CAPTURE:true}
deps =
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt
commands = stestr run --slowest {posargs}
[testenv:pep8]
deps =
hacking>=3.1.0,<4.0.0 # Apache-2.0
flake8-import-order>=0.17.1 # LGPLv3
pycodestyle>=2.0.0,<2.7.0 # MIT
whitelist_externals = bash
commands = flake8
[testenv:cover]
setenv =
{[testenv]setenv}
PYTHON=coverage run --source pyghmi --parallel-mode
commands =
stestr run {posargs}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
[testenv:docs]
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/doc/requirements.txt
commands = sphinx-build -W -b html doc/source doc/build/html
[testenv:venv]
commands = {posargs}
[flake8]
exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build
show-source = true
# E129 visually indented line with same indent as next logical line
# E731 do not assign a lambda expression, use a def
# W503 Line break occurred before a binary operator. Conflicts with W504.
ignore = E129,E731,W503
# H106: Don't put vim configuration in source files
# H203: Use assertIs(Not)None to check for None
# H204: Use assert(Not)Equal to check for equality
# H205: Use assert(Greater|Less)(Equal) for comparison
# H904: Delay string interpolations at logging calls
enable-extensions=H106,H203,H204,H205,H904
import-order-style = pep8
application-import-names = pyghmi
filename = *.py