mirror of
https://opendev.org/x/pyghmi
synced 2025-01-15 04:07:48 +00:00
90d02c0a03
Start using flake8 for style guide enforcement. Change-Id: I9d7c89498c10e682acf0f75bad20dfd4bb6152b5
63 lines
1.6 KiB
INI
63 lines
1.6 KiB
INI
[tox]
|
|
minversion = 2.8.1
|
|
envlist = py27,py3,pep8
|
|
|
|
[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}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
commands = stestr run {posargs}
|
|
stestr slowest
|
|
|
|
[tox:jenkins]
|
|
sitepackages = True
|
|
|
|
[testenv:pep8]
|
|
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]
|
|
commands = python setup.py build_sphinx
|
|
|
|
[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
|
|
# W504 line break after binary operator
|
|
ignore = E129,E731,W504
|
|
# 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
|
|
|
|
[testenv:lower-constraints]
|
|
deps =
|
|
-c{toxinidir}/lower-constraints.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
-r{toxinidir}/requirements.txt
|