The oslotest library has a nice openstack testing integrated base class that can ensure we setup our base test case using the right logging fixtures, test timeouts, and output fixtures that better operate in the openstack ecosystem. This will also allow us to remove some of the functionality that we currently have in our base test case and replace it with the equivalent (or better) functionality that oslotest now provides. Part of blueprint use-oslo-test Change-Id: I1602d5180ec8649a1899185972750ddddf65990f
107 lines
2.4 KiB
INI
107 lines
2.4 KiB
INI
[tox]
|
|
minversion = 1.6
|
|
skipsdist = True
|
|
envlist = cover,
|
|
docs,
|
|
pep8,
|
|
py26,
|
|
py26-sa7-mysql,
|
|
py27,
|
|
py27-sa8-mysql,
|
|
py33,
|
|
py34,
|
|
pylint,
|
|
|
|
[testenv]
|
|
usedevelop = True
|
|
install_command = pip install {opts} {packages}
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
deps = -r{toxinidir}/test-requirements.txt
|
|
commands = python setup.py testr --slowest --testr-args='{posargs}'
|
|
|
|
[testenv:docs]
|
|
basepython = python2.7
|
|
deps = -r{toxinidir}/requirements-py2.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
-r{toxinidir}/optional-requirements.txt
|
|
doc8
|
|
commands = python setup.py build_sphinx
|
|
doc8 doc/source
|
|
|
|
[tox:jenkins]
|
|
downloadcache = ~/cache/pip
|
|
|
|
[testenv:pep8]
|
|
commands = flake8 {posargs}
|
|
|
|
[testenv:pylint]
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
deps = -r{toxinidir}/requirements-py2.txt
|
|
pylint==0.26.0
|
|
commands = pylint --rcfile=pylintrc taskflow
|
|
|
|
[testenv:cover]
|
|
basepython = python2.7
|
|
deps = {[testenv:py27]deps}
|
|
commands = python setup.py testr --coverage --testr-args='{posargs}'
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[flake8]
|
|
# H904 Wrap long lines in parentheses instead of a backslash
|
|
ignore = H904
|
|
builtins = _
|
|
exclude = .venv,.tox,dist,doc,./taskflow/openstack/common,*egg,.git,build,tools
|
|
|
|
[hacking]
|
|
import_exceptions = six.moves.mock
|
|
taskflow.test.mock
|
|
unittest.mock
|
|
|
|
# NOTE(imelnikov): pyXY envs are considered to be default, so they must have
|
|
# richest set of test requirements
|
|
[testenv:py26]
|
|
basepython = python2.6
|
|
deps = {[testenv]deps}
|
|
-r{toxinidir}/requirements-py2.txt
|
|
MySQL-python
|
|
eventlet>=0.13.0
|
|
SQLAlchemy>=0.7.8,<=0.7.99
|
|
|
|
[testenv:py27]
|
|
deps = {[testenv]deps}
|
|
-r{toxinidir}/requirements-py2.txt
|
|
MySQL-python
|
|
eventlet>=0.13.0
|
|
SQLAlchemy>=0.7.8,<=0.9.99
|
|
doc8
|
|
commands =
|
|
python setup.py testr --slowest --testr-args='{posargs}'
|
|
sphinx-build -b doctest doc/source doc/build
|
|
doc8 doc/source
|
|
|
|
[testenv:py33]
|
|
deps = {[testenv]deps}
|
|
-r{toxinidir}/requirements-py3.txt
|
|
SQLAlchemy>=0.7.8,<=0.9.99
|
|
|
|
[testenv:py34]
|
|
deps = {[testenv]deps}
|
|
-r{toxinidir}/requirements-py3.txt
|
|
SQLAlchemy>=0.7.8,<=0.9.99
|
|
|
|
[testenv:py26-sa7-mysql]
|
|
basepython = python2.6
|
|
deps = {[testenv]deps}
|
|
-r{toxinidir}/requirements-py2.txt
|
|
SQLAlchemy>=0.7.8,<=0.7.99
|
|
MySQL-python
|
|
|
|
[testenv:py27-sa8-mysql]
|
|
basepython = python2.7
|
|
deps = {[testenv]deps}
|
|
-r{toxinidir}/requirements-py2.txt
|
|
SQLAlchemy>=0.8,<=0.8.99
|
|
MySQL-python
|