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

Method test_float_cast

test/dialect/mysql/test_compiler.py:1096–1104  ·  view source on GitHub ↗
(self, type_, expected, maria_db)

Source from the content-addressed store, hash-verified

1094 )
1095 @testing.combinations(True, False, argnames="maria_db")
1096 def test_float_cast(self, type_, expected, maria_db):
1097 dialect = mysql.dialect()
1098 if maria_db:
1099 dialect.is_mariadb = maria_db
1100 dialect.server_version_info = (10, 4, 5)
1101 else:
1102 dialect.server_version_info = (8, 0, 17)
1103 t = sql.table("t", sql.column("col"))
1104 self.assert_compile(cast(t.c.col, type_), expected, dialect=dialect)
1105
1106 def test_cast_grouped_expression_non_castable(self):
1107 with expect_warnings(

Callers

nothing calls this directly

Calls 5

castFunction · 0.90
assert_compileMethod · 0.80
dialectMethod · 0.45
tableMethod · 0.45
columnMethod · 0.45

Tested by

no test coverage detected