MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_replaced

Method test_replaced

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

Source from the content-addressed store, hash-verified

3958 assert_warns(Warning, coll.append, B())
3959
3960 def test_replaced(self):
3961 A, B = self.A, self.B
3962 a1 = A()
3963 coll = a1.bs
3964 a1.bs.append(B())
3965 a1.bs = []
3966 # a bulk replace no longer empties the old collection
3967 # as of [ticket:3913]
3968 assert len(coll) == 1
3969 coll.append(B())
3970 assert len(coll) == 2
3971
3972 def test_pop_existing(self):
3973 A, B = self.A, self.B

Callers

nothing calls this directly

Calls 3

AClass · 0.70
BClass · 0.70
appendMethod · 0.45

Tested by

no test coverage detected