MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_string

Method test_string

test/sql/test_defaults.py:40–48  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

38 __dialect__ = "default"
39
40 def test_string(self):
41 # note: that the datatype is an Integer here doesn't matter,
42 # the server_default is interpreted independently of the
43 # column's datatype.
44 m = MetaData()
45 t = Table("t", m, Column("x", Integer, server_default="5"))
46 self.assert_compile(
47 CreateTable(t), "CREATE TABLE t (x INTEGER DEFAULT '5')"
48 )
49
50 def test_string_w_quotes(self):
51 m = MetaData()

Callers

nothing calls this directly

Calls 5

MetaDataClass · 0.90
TableClass · 0.90
ColumnClass · 0.90
CreateTableClass · 0.85
assert_compileMethod · 0.80

Tested by

no test coverage detected