MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_other_options

Method test_other_options

test/sql/test_computed.py:41–53  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

39 )
40
41 def test_other_options(self):
42 t = Table(
43 "t",
44 MetaData(),
45 Column(
46 "y", Integer, Computed("x + 2"), nullable=False, unique=True
47 ),
48 )
49 self.assert_compile(
50 CreateTable(t),
51 "CREATE TABLE t ("
52 "y INTEGER GENERATED ALWAYS AS (x + 2) NOT NULL, UNIQUE (y))",
53 )
54
55 def test_server_default_onupdate(self):
56 text = (

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected