diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2015-09-17 10:18:57 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2015-09-17 10:18:57 -0400 |
commit | 53defccab70831806c5a8e192fa0ebd10df62f03 (patch) | |
tree | e76f2a67fa1b08e42f7c1cb81602dfc21e5815c3 | |
parent | 24a7241b5ef63f8e82c007d89f5c179d9596bf10 (diff) | |
download | sqlalchemy-53defccab70831806c5a8e192fa0ebd10df62f03.tar.gz |
- fixes for the ORM side test for #3531.
-rw-r--r-- | test/orm/test_lazy_relations.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/test/orm/test_lazy_relations.py b/test/orm/test_lazy_relations.py index 706f49d6f..f2e1db2da 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}] |