From 9ffd3ddb00d782723f7faf7e6e67804751daafc8 Mon Sep 17 00:00:00 2001 From: Ants Aasma Date: Mon, 6 Apr 2009 07:03:13 +0000 Subject: [PATCH] - Fixed the evaluator not being able to evaluate IS NULL clauses. - Added evaluator tests to orm/alltests.py --- CHANGES | 2 ++ lib/sqlalchemy/orm/evaluator.py | 2 +- test/orm/alltests.py | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) 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() -- 2.47.2