2014-04-18 11:33:16 +03:00
|
|
|
[tox]
|
|
|
|
minversion = 1.6
|
2014-09-08 18:01:40 -07:00
|
|
|
envlist = py26,py27,py33,py34,pep8
|
2014-04-18 11:33:16 +03:00
|
|
|
# NOTE(dhellmann): We cannot set skipdist=True
|
|
|
|
# for oslo libraries because of the namespace package.
|
|
|
|
#skipsdist = True
|
|
|
|
|
|
|
|
[testenv]
|
|
|
|
# NOTE(dhellmann): We cannot set usedevelop=True
|
|
|
|
# for oslo libraries because of the namespace package.
|
|
|
|
#usedevelop = True
|
2015-01-06 15:49:19 -05:00
|
|
|
whitelist_externals = bash
|
2014-04-18 11:33:16 +03:00
|
|
|
install_command = pip install -U {opts} {packages}
|
|
|
|
setenv =
|
|
|
|
VIRTUAL_ENV={envdir}
|
|
|
|
deps = -r{toxinidir}/requirements.txt
|
2014-09-08 18:01:40 -07:00
|
|
|
-r{toxinidir}/test-requirements-py2.txt
|
2015-01-06 15:49:19 -05:00
|
|
|
commands = bash tools/pretty_tox.sh '{posargs}'
|
2014-04-18 11:33:16 +03:00
|
|
|
|
Test for distinct SQLAlchemy major releases
This change presents one way we might include test support
for oslo.db against specific SQLAlchemy major releases, currently
including the 0.7, 0.8, and 0.9 series. As we will want to
begin including features within oslo.db that target advanced
and in some cases semi-public APIs within SQLAlchemy, it will
be important that we test these features against each major release,
as there may be variances between major revs as well as
version-specific approaches within oslo.
To accomplish this, I was not able to override "deps" alone,
as the SQLAlchemy revision within requirements.txt conflicts
with a hand-entered requirement, and due to pip's lack of
a dependency resolver (see https://github.com/pypa/pip/issues/988
and https://github.com/pypa/pip/issues/56) I instead overrode
"commands". I don't know that this is the best approach, nor
do I know how the tox.ini file is accommodated by CI servers,
if these CI servers would need their tox invocation altered or
how that works.
This patch may or may not be the way to go, but in any case
I'd like to get input on how we can ensure that more SQLAlchemy-specific
oslo.db features can be tested against multiple SQLAlchemy versions.
Note that even with this change, running the "sqla_07" environment
does in fact produce test failures, see http://paste.openstack.org/show/85263/;
so already oslo.db expects behaviors that are not present in
all SQLAlchemy versions listed in the common requirements.txt.
Change-Id: I4128272ce15b9e576d7b97b1adab4d5027108c7c
2014-07-01 15:03:34 -04:00
|
|
|
[testenv:sqla_09]
|
|
|
|
commands = pip install SQLAlchemy>=0.9.0,!=0.9.5,<1.0.0
|
|
|
|
python setup.py testr --slowest --testr-args='{posargs}'
|
|
|
|
|
|
|
|
[testenv:sqla_08]
|
|
|
|
commands = pip install SQLAlchemy>=0.8.0,<0.9.0
|
|
|
|
python setup.py testr --slowest --testr-args='{posargs}'
|
|
|
|
|
2014-09-08 18:01:40 -07:00
|
|
|
[testenv:py34]
|
|
|
|
deps = -r{toxinidir}/requirements.txt
|
|
|
|
-r{toxinidir}/test-requirements-py3.txt
|
|
|
|
|
|
|
|
[testenv:py33]
|
|
|
|
deps = -r{toxinidir}/requirements.txt
|
|
|
|
-r{toxinidir}/test-requirements-py3.txt
|
|
|
|
|
2014-04-18 11:33:16 +03:00
|
|
|
[testenv:pep8]
|
|
|
|
commands = flake8
|
|
|
|
|
|
|
|
[testenv:venv]
|
|
|
|
commands = {posargs}
|
|
|
|
|
|
|
|
[testenv:cover]
|
2014-05-19 16:57:05 -05:00
|
|
|
commands = python setup.py testr --coverage --testr-args='{posargs}'
|
2014-04-18 11:33:16 +03:00
|
|
|
|
2014-05-30 11:58:09 +03:00
|
|
|
[testenv:docs]
|
|
|
|
commands =
|
2014-08-13 21:45:42 +02:00
|
|
|
doc8 -e .rst CONTRIBUTING.rst HACKING.rst README.rst doc/source
|
2014-05-30 11:58:09 +03:00
|
|
|
python setup.py build_sphinx
|
|
|
|
|
2014-04-18 11:33:16 +03:00
|
|
|
[flake8]
|
|
|
|
# H803 skipped on purpose per list discussion.
|
|
|
|
# E123, E125 skipped as they are invalid PEP-8.
|
2014-06-12 14:55:00 +02:00
|
|
|
# TODO(pblaho): enable H305 when hacking is patched
|
|
|
|
# H305 skipped b/c of hacking is confused with oslo.* namespace
|
|
|
|
# see https://bugs.launchpad.net/hacking/+bug/1329363
|
2014-04-18 11:33:16 +03:00
|
|
|
|
|
|
|
show-source = True
|
2014-06-12 16:10:50 +02:00
|
|
|
ignore = E123,E125,H305,H307,H803,H904
|
2014-04-18 12:02:53 +03:00
|
|
|
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build
|
2014-05-27 11:59:18 +03:00
|
|
|
|
|
|
|
[hacking]
|
|
|
|
import_exceptions =
|
2014-12-12 14:23:13 -05:00
|
|
|
oslo_db._i18n
|