]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- fixes for the ORM side test for #3531.
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 17 Sep 2015 14:18:57 +0000 (10:18 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 17 Sep 2015 14:18:57 +0000 (10:18 -0400)
test/orm/test_lazy_relations.py

index 706f49d6f68255b79383290eb2b5bf360852d11c..f2e1db2da3059d435e291ed113fe450a7cb5ef0c 100644 (file)
@@ -1077,8 +1077,11 @@ class RefersToSelfLazyLoadInterferenceTest(fixtures.MappedTest):
 class TypeCoerceTest(fixtures.MappedTest, testing.AssertsExecutionResults,):
     """ORM-level test for [ticket:3531]"""
 
+    # mysql is having a recursion issue in the bind_expression
+    __only_on__ = ('sqlite', 'postgresql')
+
     class StringAsInt(TypeDecorator):
-        impl = String
+        impl = String(50)
 
         def column_expression(self, col):
             return sa.cast(col, Integer)
@@ -1095,7 +1098,7 @@ class TypeCoerceTest(fixtures.MappedTest, testing.AssertsExecutionResults,):
         Table(
             "pets", metadata,
             Column("id", Integer, primary_key=True),
-            Column("person_id", cls.StringAsInt()),
+            Column("person_id", Integer),
         )
 
     @classmethod
@@ -1139,7 +1142,7 @@ class TypeCoerceTest(fixtures.MappedTest, testing.AssertsExecutionResults,):
 
         asserter.assert_(
             CompiledSQL(
-                "SELECT pets.id AS pets_id, CAST(pets.person_id AS INTEGER) "
+                "SELECT pets.id AS pets_id, pets.person_id "
                 "AS pets_person_id FROM pets "
                 "WHERE pets.person_id = CAST(:param_1 AS INTEGER)",
                 [{'param_1': 5}]