summaryrefslogtreecommitdiff
path: root/tox.ini
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2014-07-01 15:03:34 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2014-07-01 15:21:12 -0400
commita1fd49fd9b726017de02856ab0e0dfe3751e2394 (patch)
tree38d7744122c8aa1eebe7f0e650d1a899b105bee3 /tox.ini
parent9c423b43e6096c533f6bf442be93da6b635af0dd (diff)
downloadoslo-db-a1fd49fd9b726017de02856ab0e0dfe3751e2394.tar.gz
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
Diffstat (limited to 'tox.ini')
-rw-r--r--tox.ini12
1 files changed, 12 insertions, 0 deletions
diff --git a/tox.ini b/tox.ini
index b4c00d4..099d27b 100644
--- a/tox.ini
+++ b/tox.ini
@@ -17,6 +17,18 @@ deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands = python setup.py testr --slowest --testr-args='{posargs}'
+[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}'
+
+[testenv:sqla_07]
+commands = pip install SQLAlchemy>=0.7.7,<0.8.0
+ python setup.py testr --slowest --testr-args='{posargs}'
+
[testenv:pep8]
commands = flake8