MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_generic_random

Method test_generic_random

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

Source from the content-addressed store, hash-verified

218 self.assert_compile(func.now(), ret, dialect=dialect)
219
220 def test_generic_random(self):
221 assert func.random().type == sqltypes.NULLTYPE
222 assert isinstance(func.random(type_=Integer).type, Integer)
223
224 for ret, dialect in [
225 ("random()", sqlite.dialect()),
226 ("random()", postgresql.dialect()),
227 ("rand()", mysql.dialect()),
228 ("random()", oracle.dialect()),
229 ]:
230 self.assert_compile(func.random(), ret, dialect=dialect)
231
232 def test_return_type_aggregate_strings(self):
233 t = table("t", column("value", String))

Callers

nothing calls this directly

Calls 3

randomMethod · 0.80
assert_compileMethod · 0.80
dialectMethod · 0.45

Tested by

no test coverage detected