summaryrefslogtreecommitdiff
path: root/test/dialect/test_mysql.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2010-05-08 15:29:08 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2010-05-08 15:29:08 -0400
commit7009a3bc32daadf078e2806622615c665105240e (patch)
tree1950fb031164989fce06f6c5e9eac08f0cdfa88e /test/dialect/test_mysql.py
parent78434e037fa835db145666ae1cb7773e93e3d899 (diff)
downloadsqlalchemy-7009a3bc32daadf078e2806622615c665105240e.tar.gz
- func.sysdate() emits "SYSDATE()", i.e. with the ending
parenthesis, on MySQL. [ticket:1794]
Diffstat (limited to 'test/dialect/test_mysql.py')
-rw-r--r--test/dialect/test_mysql.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/dialect/test_mysql.py b/test/dialect/test_mysql.py
index b0859210d..f61af4238 100644
--- a/test/dialect/test_mysql.py
+++ b/test/dialect/test_mysql.py
@@ -1069,6 +1069,9 @@ class SQLTest(TestBase, AssertsCompiledSQL):
def test_utc_timestamp(self):
self.assert_compile(func.utc_timestamp(), "UTC_TIMESTAMP")
+ def test_sysdate(self):
+ self.assert_compile(func.sysdate(), "SYSDATE()")
+
def test_cast(self):
t = sql.table('t', sql.column('col'))
m = mysql
@@ -1237,7 +1240,10 @@ class ExecutionTest(TestBase):
meta.reflect(cx)
eq_(cx.dialect._connection_charset, charset)
cx.close()
-
+
+ def test_sysdate(self):
+ d = testing.db.scalar(func.sysdate())
+ assert isinstance(d, datetime.datetime)
class MatchTest(TestBase, AssertsCompiledSQL):
__only_on__ = 'mysql'