diff options
Diffstat (limited to 'test/sql/functions.py')
-rw-r--r-- | test/sql/functions.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/sql/functions.py b/test/sql/functions.py index 6754d6d42..681d6a557 100644 --- a/test/sql/functions.py +++ b/test/sql/functions.py @@ -8,6 +8,7 @@ from sqlalchemy.engine import default from sqlalchemy import types as sqltypes from testlib import * from sqlalchemy.sql.functions import GenericFunction +from testlib.testing import eq_ from sqlalchemy.databases import * # every dialect in databases.__all__ is expected to pass these tests. @@ -68,6 +69,14 @@ class CompileTest(TestBase, AssertsCompiledSQL): ]: self.assert_compile(func.random(), ret, dialect=dialect) + def test_generic_count(self): + assert isinstance(func.count().type, sqltypes.Integer) + + self.assert_compile(func.count(), 'count(*)') + self.assert_compile(func.count(1), 'count(:param_1)') + c = column('abc') + self.assert_compile(func.count(c), 'count(abc)') + def test_constructor(self): try: func.current_timestamp('somearg') |