MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_empty_uc

Method test_empty_uc

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

Source from the content-addressed store, hash-verified

1156 )
1157
1158 def test_empty_uc(self):
1159 # test that an empty constraint is ignored
1160 metadata = MetaData()
1161 tbl = Table(
1162 "test",
1163 metadata,
1164 Column("x", Integer, autoincrement=False),
1165 Column("y", Integer, autoincrement=False),
1166 UniqueConstraint(),
1167 )
1168 self.assert_compile(
1169 schema.CreateTable(tbl), "CREATE TABLE test (x INTEGER, y INTEGER)"
1170 )
1171
1172 def test_deferrable_column_check(self):
1173 t = Table(

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected