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

Method test_check_constraint_copy

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

Source from the content-addressed store, hash-verified

272 eq_(getattr(fk2c, k), kw[k])
273
274 def test_check_constraint_copy(self):
275 def r(x):
276 return x
277
278 c = CheckConstraint(
279 "foo bar",
280 name="name",
281 initially=True,
282 deferrable=True,
283 comment="foo",
284 _create_rule=r,
285 )
286 c2 = c._copy()
287 eq_(c2.name, "name")
288 eq_(str(c2.sqltext), "foo bar")
289 eq_(c2.initially, True)
290 eq_(c2.deferrable, True)
291 eq_(c2.comment, "foo")
292 assert c2._create_rule is r
293
294 def test_col_replace_w_constraint(self):
295 m = MetaData()

Callers

nothing calls this directly

Calls 3

_copyMethod · 0.95
CheckConstraintClass · 0.90
eq_Function · 0.90

Tested by

no test coverage detected