]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- Fixed the evaluator not being able to evaluate IS NULL clauses.
authorAnts Aasma <ants.aasma@gmail.com>
Mon, 6 Apr 2009 07:03:13 +0000 (07:03 +0000)
committerAnts Aasma <ants.aasma@gmail.com>
Mon, 6 Apr 2009 07:03:13 +0000 (07:03 +0000)
- Added evaluator tests to orm/alltests.py

CHANGES
lib/sqlalchemy/orm/evaluator.py
test/orm/alltests.py

diff --git a/CHANGES b/CHANGES
index bb921bb524475103019b8720da60098dd3f8dff4..bd853aac4be04c23564f36dcc162c7c3a3d5dfb1 100644 (file)
--- 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
index 4611dd91b46c5951306511f7bd9041ca2bd18c3e..9076f610d722ebb65d12df68b5b764a0c4e5eb07 100644 (file)
@@ -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:
index a95eca762926eaabb01a1b0d6ee1b280e72ac87e..9458ca5236fb44d4a6b07908f526471b8e27e03a 100644 (file)
@@ -41,6 +41,8 @@ def suite():
         'orm.onetoone',
         'orm.dynamic',
 
+        'orm.evaluator',
+
         'orm.deprecations',
         )
     alltests = unittest.TestSuite()