]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
some comparison fixes
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 28 Jun 2007 18:25:39 +0000 (18:25 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 28 Jun 2007 18:25:39 +0000 (18:25 +0000)
test/orm/inheritance/polymorph2.py
test/sql/generative.py

index 65650f6686f36197c77985a8a2d259c556e5bbfa..e493823f58e46d826bf979a2dc905da16ad3504f 100644 (file)
@@ -904,7 +904,7 @@ class CustomPKTest(testbase.ORMTest):
         
         # query using get(), using only one value.  this requires the select_table mapper
         # has the same single-col primary key.
-        assert sess.query(T1).get(ot1.id).id is ot1.id
+        assert sess.query(T1).get(ot1.id).id == ot1.id
         
         ot1 = sess.query(T1).get(ot1.id)
         ot1.data = 'hi'
@@ -946,7 +946,7 @@ class CustomPKTest(testbase.ORMTest):
 
         # query using get(), using only one value.  this requires the select_table mapper
         # has the same single-col primary key.
-        assert sess.query(T1).get(ot1.id).id is ot1.id
+        assert sess.query(T1).get(ot1.id).id == ot1.id
 
         ot1 = sess.query(T1).get(ot1.id)
         ot1.data = 'hi'
index 18fa02dcfe0d83137bea368edf49120d7f8d7530..17b5e9cf0637fc160c330b4c2ea04d77631ba910 100644 (file)
@@ -121,7 +121,7 @@ class TraversalTest(testbase.AssertMixin):
         vis = Vis()
         s2 = vis.traverse(struct, clone=True)
         assert struct != s2
-        assert struct is not s2
+        assert not struct.is_other(s2)
         assert struct2 == s2
 
         class Vis2(ClauseVisitor):
@@ -137,6 +137,8 @@ class TraversalTest(testbase.AssertMixin):
         assert struct3 == s3
 
 class ClauseTest(testbase.AssertMixin):
+    """test copy-in-place behavior of various ClauseElements."""
+    
     def setUpAll(self):
         global t1, t2
         t1 = table("table1",