MCPcopy Create free account
hub / github.com/zzzeek/sqlalchemy / test_empty_pkc

Method test_empty_pkc

test/sql/test_constraints.py:1144–1156  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1142 )
1143
1144 def test_empty_pkc(self):
1145 # test that an empty primary key is ignored
1146 metadata = MetaData()
1147 tbl = Table(
1148 "test",
1149 metadata,
1150 Column("x", Integer, autoincrement=False),
1151 Column("y", Integer, autoincrement=False),
1152 PrimaryKeyConstraint(),
1153 )
1154 self.assert_compile(
1155 schema.CreateTable(tbl), "CREATE TABLE test (x INTEGER, y INTEGER)"
1156 )
1157
1158 def test_empty_uc(self):
1159 # test that an empty constraint is ignored

Callers

nothing calls this directly

Calls 5

MetaDataClass · 0.90
TableClass · 0.90
ColumnClass · 0.90
assert_compileMethod · 0.80

Tested by

no test coverage detected