MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_pop_existing

Method test_pop_existing

test/orm/test_attributes.py:3972–3979  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

3970 assert len(coll) == 2
3971
3972 def test_pop_existing(self):
3973 A, B = self.A, self.B
3974 a1 = A()
3975 coll = a1.bs
3976 a1.bs.append(B())
3977 state = attributes.instance_state(a1)
3978 state._reset(state.dict, "bs")
3979 assert_warns(Warning, coll.append, B())
3980
3981 def test_ad_hoc_lazy(self):
3982 A, B = self.A, self.B

Callers

nothing calls this directly

Calls 5

assert_warnsFunction · 0.90
AClass · 0.70
BClass · 0.70
appendMethod · 0.45
_resetMethod · 0.45

Tested by

no test coverage detected