storyboard/tox.ini
Monty Taylor 45f7ed5a43
Switch to using stestr for tests
OpenStack is switching from testrepository to stestr. Make the shift
here.

Also, while doing this, update the rest of the test-requirements.
testtools and python-subunit are removed because they are transitive
deps of oslotest and stestr already.

Change-Id: Idf1298e03a78653044532fd54a4f35dcf5c6c1c5
2018-10-17 14:24:24 -05:00

76 lines
2.0 KiB
INI

[tox]
minversion = 2.9.1
skipsdist = True
envlist = py35,py27,pep8
[testenv]
usedevelop = True
install_command = pip install -U {opts} {packages}
passenv = OS_* STORYBOARD_*
setenv =
VIRTUAL_ENV={envdir}
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
whitelist_externals = bash
[testenv:sqlite]
basepython = python3
setenv =
{[testenv]setenv}
STORYBOARD_TEST_DB=sqlite:///{envtmpdir}
[testenv:pep8]
basepython = python3
commands = flake8
[testenv:venv]
basepython = python2
commands = {posargs}
[testenv:docs]
basepython = python3
deps = -r{toxinidir}/doc/requirements.txt
commands =
rm -rf doc/html doc/build
rm -rf doc/source/apidoc doc/source/api
sphinx-build -W -b html doc/source doc/build/html
[testenv:cover]
basepython = python3
setenv =
{[testenv]setenv}
PYTHON=coverage run --source storyboard --parallel-mode
commands =
stestr run {posargs}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
[flake8]
# E125 and E128 are ignored on purpose, they are invalid pep8
# The following rules should either be addressed or determined to be
# skippable long term.
# E265 is ignored to make switch to newer hacking easier
# H405 is ignored to make switch to newer hacking easier
ignore = E125,E128,E265,H405
builtins = _
show-source = True
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
[testenv:bindep]
basepython = python3
# Do not install any requirements. We want this to be fast and work even if
# system dependencies are missing, since it's used to tell you what system
# dependencies are missing! This also means that bindep must be installed
# separately, outside of the requirements files.
deps = bindep
commands = bindep test
[hacking]
import_exceptions = storyboard._i18n