MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_expired

Method test_expired

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

Source from the content-addressed store, hash-verified

3949 _register_attribute(A, "bs", uselist=True, useobject=True)
3950
3951 def test_expired(self):
3952 A, B = self.A, self.B
3953 a1 = A()
3954 coll = a1.bs
3955 a1.bs.append(B())
3956 state = attributes.instance_state(a1)
3957 state._expire(state.dict, set())
3958 assert_warns(Warning, coll.append, B())
3959
3960 def test_replaced(self):
3961 A, B = self.A, self.B

Callers

nothing calls this directly

Calls 5

assert_warnsFunction · 0.90
_expireMethod · 0.80
AClass · 0.70
BClass · 0.70
appendMethod · 0.45

Tested by

no test coverage detected