summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/testing/exclusions.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2013-12-17 14:24:48 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2013-12-17 14:24:48 -0500
commit10ac89cef3dafc7a23c8947255f26d60db2c4d84 (patch)
treee508bb1e9b8dfb7d6e24c80317006f77d757066c /lib/sqlalchemy/testing/exclusions.py
parent2c3afb4dcb6bedd5189ec7e5e25afaa4636be4c9 (diff)
downloadsqlalchemy-10ac89cef3dafc7a23c8947255f26d60db2c4d84.tar.gz
- enhance the exclusions system to support database versions within the __only_on__ attribute
Diffstat (limited to 'lib/sqlalchemy/testing/exclusions.py')
-rw-r--r--lib/sqlalchemy/testing/exclusions.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/sqlalchemy/testing/exclusions.py b/lib/sqlalchemy/testing/exclusions.py
index d126c3aa5..9f14ee105 100644
--- a/lib/sqlalchemy/testing/exclusions.py
+++ b/lib/sqlalchemy/testing/exclusions.py
@@ -98,7 +98,14 @@ class Predicate(object):
elif isinstance(predicate, tuple):
return SpecPredicate(*predicate)
elif isinstance(predicate, util.string_types):
- return SpecPredicate(predicate, None, None)
+ tokens = predicate.split(" ", 2)
+ op = spec = None
+ db = tokens.pop(0)
+ if tokens:
+ op = tokens.pop(0)
+ if tokens:
+ spec = tuple(int(d) for d in tokens.pop(0).split("."))
+ return SpecPredicate(db, op, spec)
elif util.callable(predicate):
return LambdaPredicate(predicate)
else: