MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / test_check_constraint_copy

Method test_check_constraint_copy

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

Source from the content-addressed store, hash-verified

4015 eq_(getattr(c, k), v)
4016
4017 def test_check_constraint_copy(self):
4018 m = MetaData()
4019 t = Table("tbl", m, Column("a", Integer), Column("b", Integer))
4020 ck = CheckConstraint(t.c.a > 5)
4021 ck2 = ck._copy()
4022 assert ck in t.constraints
4023 assert ck2 not in t.constraints
4024
4025 def test_ambig_check_constraint_auto_append(self):
4026 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