From: Ants Aasma Date: Mon, 6 Apr 2009 07:03:13 +0000 (+0000) Subject: - Fixed the evaluator not being able to evaluate IS NULL clauses. X-Git-Tag: rel_0_5_4~31 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=9ffd3ddb00d782723f7faf7e6e67804751daafc8;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git - Fixed the evaluator not being able to evaluate IS NULL clauses. - Added evaluator tests to orm/alltests.py --- diff --git a/CHANGES b/CHANGES index bb921bb524..bd853aac4b 100644 --- a/CHANGES +++ b/CHANGES @@ -8,6 +8,8 @@ CHANGES ===== - orm + - Fixed the evaluator not being able to evaluate IS NULL clauses. + - Fixed the "set collection" function on "dynamic" relations to initiate events correctly. Previously a collection could only be assigned to a pending parent instance, otherwise modified diff --git a/lib/sqlalchemy/orm/evaluator.py b/lib/sqlalchemy/orm/evaluator.py index 4611dd91b4..9076f610d7 100644 --- a/lib/sqlalchemy/orm/evaluator.py +++ b/lib/sqlalchemy/orm/evaluator.py @@ -68,7 +68,7 @@ class EvaluatorCompiler(object): if operator is operators.is_: def evaluate(obj): return eval_left(obj) == eval_right(obj) - if operator is operators.isnot: + elif operator is operators.isnot: def evaluate(obj): return eval_left(obj) != eval_right(obj) elif operator in _straight_ops: diff --git a/test/orm/alltests.py b/test/orm/alltests.py index a95eca7629..9458ca5236 100644 --- a/test/orm/alltests.py +++ b/test/orm/alltests.py @@ -41,6 +41,8 @@ def suite(): 'orm.onetoone', 'orm.dynamic', + 'orm.evaluator', + 'orm.deprecations', ) alltests = unittest.TestSuite()