]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- additional mysql cast-related test fixes
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 10 Feb 2015 01:49:19 +0000 (20:49 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 10 Feb 2015 01:49:19 +0000 (20:49 -0500)
test/dialect/mysql/test_query.py
test/orm/test_query.py

index ccb501651a4b467cb39aed447e2585429a8bc751..f19177c2ae6044f5fb814eec4f2f1ce180dabd83 100644 (file)
@@ -10,6 +10,7 @@ class IdiosyncrasyTest(fixtures.TestBase, AssertsCompiledSQL):
     __only_on__ = 'mysql'
     __backend__ = True
 
+    @testing.emits_warning()
     def test_is_boolean_symbols_despite_no_native(self):
         is_(
             testing.db.scalar(select([cast(true().is_(true()), Boolean)])),
index a2a1ee09614d5e3911e0aa9fadb0bf768453c9cd..b83a6304b4de63527a2687d3c2dac45832517055 100644 (file)
@@ -1588,6 +1588,14 @@ class FilterTest(QueryTest, AssertsCompiledSQL):
             offset(bindparam('offset')).params(limit=2, offset=1).all(),
             [User(id=8), User(id=9)]
         )
+
+    @testing.fails_on("mysql", "doesn't like CAST in the limit clause")
+    @testing.requires.bound_limit_offset
+    def test_select_with_bindparam_offset_limit_w_cast(self):
+        User = self.classes.User
+        sess = create_session()
+        q1 = sess.query(self.classes.User).\
+            order_by(self.classes.User.id).limit(bindparam('n'))
         eq_(
             list(
                 sess.query(User).params(a=1, b=3).order_by(User.id)