ironic-staging-drivers/tox.ini
Riccardo Pittau 85e64777d8 Drop ostestr in favor of stestr
With this patch we drop ostestr to use stestr directly to avoid
current and future incompatibilities that can break the test
process, e.g. [1]

Also some minor changes:
- following recent changes to global requirements [2],
we update sphinx requirements locally
- removing py35 in favor of generic py3 test
- updating upper-constraints link to use opendev.org

[1] https://bugs.launchpad.net/os-testr/+bug/1827834
[2] If558f184c959e4b63b56dec3ca1571d1034cfe5c

Change-Id: I9328fa7e68e1e03a20182e728840075bea7c5ac6
2019-05-24 10:58:27 +02:00

75 lines
2.0 KiB
INI

[tox]
minversion = 1.8
skipsdist = True
envlist = py3,py27,pep8
[testenv]
usedevelop = True
install_command = pip install -U {opts} {packages}
setenv = VIRTUAL_ENV={envdir}
PYTHONDONTWRITEBYTECODE = 1
LANGUAGE=en_US
LC_ALL=en_US.UTF-8
TESTS_DIR=./ironic_staging_drivers/tests/unit/
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/extra-requirements.txt
commands =
stestr run {posargs}
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
[testenv:pep8]
basepython = python3
commands =
flake8 {posargs}
doc8 README.rst CONTRIBUTING.rst HACKING.rst doc/source
[testenv:venv]
basepython = python3
commands = {posargs}
[testenv:cover]
basepython = python3
setenv =
VIRTUAL_ENV={envdir}
LANGUAGE=en_US
PYTHON=coverage run --source ironic_staging_drivers --omit='*tests*' --parallel-mode
commands =
coverage erase
stestr run {posargs}
coverage combine
coverage report --omit='*tests*'
coverage html -d ./cover --omit='*tests*'
[testenv:docs]
basepython = python3
commands = python setup.py build_sphinx
[testenv:debug]
basepython = python3
commands = oslo_debug_helper {posargs}
[testenv:releasenotes]
basepython = python3
commands = sphinx-build -a -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[flake8]
# [E129] visually indented line with same indent as next logical line
ignore = E129
exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build
import-order-style = pep8
application-import-names = ironic_staging_drivers
max-complexity=17
# [H106] Don't put vim configuration in source files.
# [H203] Use assertIs(Not)None to check for None.
# [H904] Delay string interpolations at logging calls.
enable-extensions=H106,H203,H904
[testenv:lower-constraints]
basepython = python3
deps =
-c{toxinidir}/lower-constraints.txt
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/extra-requirements.txt