2013-06-30 14:06:53 -04:00
|
|
|
[tox]
|
2021-01-27 10:20:30 +01:00
|
|
|
minversion = 3.9.0
|
2019-11-22 11:01:25 +01:00
|
|
|
envlist = py27,py3,pep8
|
2021-01-27 10:20:30 +01:00
|
|
|
skipsdist = True
|
|
|
|
ignore_basepython_conflict=true
|
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}
|
2021-01-27 10:20:30 +01:00
|
|
|
deps =
|
|
|
|
-r{toxinidir}/test-requirements.txt
|
|
|
|
-r{toxinidir}/requirements.txt
|
|
|
|
commands = stestr run --slowest {posargs}
|
2013-06-30 14:06:53 -04:00
|
|
|
|
|
|
|
[testenv:pep8]
|
2021-01-27 10:20:30 +01:00
|
|
|
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
|
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
|
|
|
|
2021-01-27 10:20:30 +01:00
|
|
|
[testenv:py27]
|
|
|
|
deps =
|
|
|
|
-c{toxinidir}/py27-constraints.txt
|
|
|
|
-r{toxinidir}/requirements.txt
|
|
|
|
-r{toxinidir}/test-requirements.txt
|
|
|
|
|
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]
|
2021-01-27 10:20:30 +01:00
|
|
|
deps =
|
|
|
|
-r{toxinidir}/requirements.txt
|
|
|
|
-r{toxinidir}/doc/requirements.txt
|
|
|
|
commands = sphinx-build -W -b html doc/source doc/build/html
|
2018-08-17 11:13:47 +02:00
|
|
|
|
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
|