2013-06-30 14:06:53 -04:00
|
|
|
[tox]
|
2018-08-10 14:04:40 +02:00
|
|
|
minversion = 2.8.1
|
2019-11-22 11:01:25 +01:00
|
|
|
envlist = py27,py3,pep8
|
2013-06-30 14:06:53 -04:00
|
|
|
|
|
|
|
[testenv]
|
2019-11-22 11:01:25 +01:00
|
|
|
basepython = python3
|
2013-06-30 14:06:53 -04:00
|
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
|
|
LANG=en_US.UTF-8
|
|
|
|
LANGUAGE=en_US:en
|
|
|
|
LC_ALL=C
|
2017-01-05 14:52:07 +00:00
|
|
|
TESTS_DIR=./pyghmi/tests/unit/
|
2018-08-10 14:04:40 +02:00
|
|
|
OS_LOG_CAPTURE={env:OS_LOG_CAPTURE:true}
|
|
|
|
OS_STDOUT_CAPTURE={env:OS_STDOUT_CAPTURE:true}
|
|
|
|
OS_STDERR_CAPTURE={env:OS_STDERR_CAPTURE:true}
|
2013-06-30 14:06:53 -04:00
|
|
|
deps = -r{toxinidir}/requirements.txt
|
|
|
|
-r{toxinidir}/test-requirements.txt
|
2018-08-10 14:04:40 +02:00
|
|
|
commands = stestr run {posargs}
|
|
|
|
stestr slowest
|
2013-06-30 14:06:53 -04:00
|
|
|
|
|
|
|
[tox:jenkins]
|
|
|
|
sitepackages = True
|
|
|
|
|
|
|
|
[testenv:pep8]
|
2014-12-31 00:13:08 +00:00
|
|
|
whitelist_externals = bash
|
2019-12-17 14:57:16 +01:00
|
|
|
commands = flake8
|
2013-06-30 14:06:53 -04:00
|
|
|
|
|
|
|
[testenv:cover]
|
2018-08-10 14:04:40 +02:00
|
|
|
setenv =
|
|
|
|
{[testenv]setenv}
|
|
|
|
PYTHON=coverage run --source pyghmi --parallel-mode
|
2013-06-30 14:06:53 -04:00
|
|
|
commands =
|
2018-08-10 14:04:40 +02:00
|
|
|
stestr run {posargs}
|
|
|
|
coverage combine
|
|
|
|
coverage html -d cover
|
|
|
|
coverage xml -o cover/coverage.xml
|
2013-06-30 14:06:53 -04:00
|
|
|
|
2018-08-17 11:13:47 +02:00
|
|
|
[testenv:docs]
|
|
|
|
commands = python setup.py build_sphinx
|
|
|
|
|
2013-06-30 14:06:53 -04:00
|
|
|
[testenv:venv]
|
|
|
|
commands = {posargs}
|
|
|
|
|
|
|
|
[flake8]
|
2019-12-17 14:57:16 +01:00
|
|
|
exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build
|
2013-06-30 14:06:53 -04:00
|
|
|
show-source = true
|
2019-12-17 14:57:16 +01:00
|
|
|
# E129 visually indented line with same indent as next logical line
|
|
|
|
# E731 do not assign a lambda expression, use a def
|
2020-03-30 15:53:19 +02:00
|
|
|
# W503 Line break occurred before a binary operator. Conflicts with W504.
|
|
|
|
ignore = E129,E731,W503
|
2019-12-17 14:57:16 +01:00
|
|
|
# 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
|
2020-05-11 14:08:17 +02:00
|
|
|
application-import-names = pyghmi
|
|
|
|
filename = *.py
|
2018-05-16 15:18:13 +02:00
|
|
|
|
|
|
|
[testenv:lower-constraints]
|
|
|
|
deps =
|
|
|
|
-c{toxinidir}/lower-constraints.txt
|
|
|
|
-r{toxinidir}/test-requirements.txt
|
|
|
|
-r{toxinidir}/requirements.txt
|