From 42f2a16be7ff462048857799decc41a95c459fc3 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sat, 26 Oct 2013 16:32:17 -0400 Subject: - add copyright to source files missing it --- lib/sqlalchemy/testing/exclusions.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/sqlalchemy/testing/exclusions.py') diff --git a/lib/sqlalchemy/testing/exclusions.py b/lib/sqlalchemy/testing/exclusions.py index f580f3fde..d126c3aa5 100644 --- a/lib/sqlalchemy/testing/exclusions.py +++ b/lib/sqlalchemy/testing/exclusions.py @@ -1,3 +1,8 @@ +# testing/exclusions.py +# Copyright (C) 2005-2013 the SQLAlchemy authors and contributors +# +# This module is part of SQLAlchemy and is released under +# the MIT License: http://www.opensource.org/licenses/mit-license.php import operator -- cgit v1.2.1 From 10ac89cef3dafc7a23c8947255f26d60db2c4d84 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Tue, 17 Dec 2013 14:24:48 -0500 Subject: - enhance the exclusions system to support database versions within the __only_on__ attribute --- lib/sqlalchemy/testing/exclusions.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'lib/sqlalchemy/testing/exclusions.py') 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: -- cgit v1.2.1 From 4b923d37bdfdb44d9a3e74aed08e2726e14c3b19 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Thu, 2 Jan 2014 14:23:14 -0500 Subject: - support addition of fails_if()/only_on(), just wraps the decorators - update a few exclusions to support current pymssql. passes all of test_suite and dialect/mssql --- lib/sqlalchemy/testing/exclusions.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/sqlalchemy/testing/exclusions.py') diff --git a/lib/sqlalchemy/testing/exclusions.py b/lib/sqlalchemy/testing/exclusions.py index 9f14ee105..611e9de6c 100644 --- a/lib/sqlalchemy/testing/exclusions.py +++ b/lib/sqlalchemy/testing/exclusions.py @@ -24,6 +24,11 @@ class skip_if(object): def enabled(self): return not self.predicate() + def __add__(self, other): + def decorate(fn): + return other(self(fn)) + return decorate + @contextlib.contextmanager def fail_if(self, name='block'): try: -- cgit v1.2.1 From f89d4d216bd7605c920b7b8a10ecde6bfea2238c Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sun, 5 Jan 2014 16:57:05 -0500 Subject: - happy new year --- lib/sqlalchemy/testing/exclusions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/sqlalchemy/testing/exclusions.py') diff --git a/lib/sqlalchemy/testing/exclusions.py b/lib/sqlalchemy/testing/exclusions.py index 611e9de6c..f868f6396 100644 --- a/lib/sqlalchemy/testing/exclusions.py +++ b/lib/sqlalchemy/testing/exclusions.py @@ -1,5 +1,5 @@ # testing/exclusions.py -# Copyright (C) 2005-2013 the SQLAlchemy authors and contributors +# Copyright (C) 2005-2014 the SQLAlchemy authors and contributors # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php -- cgit v1.2.1