summaryrefslogtreecommitdiff
path: root/test/sql/test_functions.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/sql/test_functions.py')
-rw-r--r--test/sql/test_functions.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/sql/test_functions.py b/test/sql/test_functions.py
index 8e5c6bc58..478f41381 100644
--- a/test/sql/test_functions.py
+++ b/test/sql/test_functions.py
@@ -289,6 +289,12 @@ class CompileTest(fixtures.TestBase, AssertsCompiledSQL):
"WHERE users.id BETWEEN c1.z AND c2.z",
checkparams={'y_1': 45, 'x_1': 17, 'y_2': 12, 'x_2': 5})
+ def test_non_functions(self):
+ expr = func.cast("foo", Integer)
+ self.assert_compile(expr, "CAST(:param_1 AS INTEGER)")
+
+ expr = func.extract("year", datetime.date(2010, 12, 5))
+ self.assert_compile(expr, "EXTRACT(year FROM :param_1)")
class ExecuteTest(fixtures.TestBase):
@engines.close_first