MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_check_constraint_copy

Method test_check_constraint_copy

test/sql/test_metadata.py:4219–4225  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

4217 eq_(getattr(c, k), v)
4218
4219 def test_check_constraint_copy(self):
4220 m = MetaData()
4221 t = Table("tbl", m, Column("a", Integer), Column("b", Integer))
4222 ck = CheckConstraint(t.c.a > 5)
4223 ck2 = ck._copy()
4224 assert ck in t.constraints
4225 assert ck2 not in t.constraints
4226
4227 def test_ambig_check_constraint_auto_append(self):
4228 m = MetaData()

Callers

nothing calls this directly

Calls 5

_copyMethod · 0.95
MetaDataClass · 0.90
TableClass · 0.90
ColumnClass · 0.90
CheckConstraintClass · 0.90

Tested by

no test coverage detected