From 53defccab70831806c5a8e192fa0ebd10df62f03 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Thu, 17 Sep 2015 10:18:57 -0400 Subject: [PATCH] - fixes for the ORM side test for #3531. --- test/orm/test_lazy_relations.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/test/orm/test_lazy_relations.py b/test/orm/test_lazy_relations.py index 706f49d6f6..f2e1db2da3 100644 --- a/test/orm/test_lazy_relations.py +++ b/test/orm/test_lazy_relations.py @@ -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}] -- 2.47.3