From: Mike Bayer Date: Wed, 29 Jan 2014 22:09:50 +0000 (-0500) Subject: - add a test for [ticket:2927], which is an 0.9 issue but only because 0.8 X-Git-Tag: rel_0_8_5~33 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=66fe0880bae38b09ba94188ee1c67391c667e64b;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git - add a test for [ticket:2927], which is an 0.9 issue but only because 0.8 isn't annotating correctly --- diff --git a/test/sql/test_functions.py b/test/sql/test_functions.py index b325b7763a..a01929f700 100644 --- a/test/sql/test_functions.py +++ b/test/sql/test_functions.py @@ -77,6 +77,15 @@ class CompileTest(fixtures.TestBase, AssertsCompiledSQL): ]: self.assert_compile(func.random(), ret, dialect=dialect) + def test_generic_annotation(self): + # test [ticket:2927]: + # this passes in 0.8 because we forget to + # pre-annotate the "functions.XYZ" classes in sql.util + fn = func.coalesce('x', 'y')._annotate({"foo": "bar"}) + self.assert_compile( + fn, "coalesce(:param_1, :param_2)" + ) + def test_custom_default_namespace(self): class myfunc(GenericFunction): pass