MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / test_generic_now

Method test_generic_now

test/sql/test_functions.py:195–204  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

193 )
194
195 def test_generic_now(self):
196 assert isinstance(func.now().type, sqltypes.DateTime)
197
198 for ret, dialect in [
199 ("CURRENT_TIMESTAMP", sqlite.dialect()),
200 ("now()", postgresql.dialect()),
201 ("now()", mysql.dialect()),
202 ("CURRENT_TIMESTAMP", oracle.dialect()),
203 ]:
204 self.assert_compile(func.now(), ret, dialect=dialect)
205
206 def test_generic_random(self):
207 assert func.random().type == sqltypes.NULLTYPE

Callers

nothing calls this directly

Calls 3

nowMethod · 0.80
assert_compileMethod · 0.80
dialectMethod · 0.45

Tested by

no test coverage detected