
This commit bumps the os-testr version to use 1.0.0. 1.0.0 changes the internals to use stestr instead of subprocessing testr. A bunch of incorrect imports in the tests were updated as a well, relying on relative import paths is finicky at the best of times so to make the tests work this just points to the path based on the root of the package instead. Change-Id: I2aed3f6a9adeac2b7dbe58ee12c0a1485278d56f
60 lines
1.6 KiB
INI
60 lines
1.6 KiB
INI
[tox]
|
|
minversion = 1.6
|
|
skipsdist = True
|
|
envlist = py34,py27,pep8
|
|
|
|
[testenv]
|
|
usedevelop = True
|
|
install_command = pip install -U {opts} {packages}
|
|
setenv =
|
|
VIRTUAL_ENV={envdir}
|
|
OS_STDERR_CAPTURE=1
|
|
OS_STDOUT_CAPTURE=1
|
|
OS_TEST_TIMEOUT=60
|
|
passenv = OS_TEST_TIMEOUT
|
|
deps = -r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
commands = ostestr '{posargs}'
|
|
whitelist_externals = bash
|
|
|
|
[testenv:pep8]
|
|
commands = flake8
|
|
|
|
[testenv:venv]
|
|
basepython = python2
|
|
commands = {posargs}
|
|
|
|
[testenv:docs]
|
|
commands =
|
|
rm -rf doc/html doc/build
|
|
rm -rf doc/source/apidoc doc/source/api
|
|
python setup.py build_sphinx
|
|
|
|
[testenv:cover]
|
|
commands = python setup.py testr --coverage --testr-args='{posargs}'
|
|
|
|
[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.
|
|
# H405 is ignored to make switch to newer hacking easier
|
|
# H234 is ignored to make switch to newer hacking easier
|
|
# H233 is ignored to make switch to newer hacking easier
|
|
# E265 is ignored to make switch to newer hacking easier
|
|
# H236 is ignored to make switch to newer hacking easier
|
|
ignore = E125,E128,H405,H234,H233,E265,H236
|
|
builtins = _
|
|
show-source = True
|
|
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
|
|
|
|
[testenv:bindep]
|
|
# 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
|