MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_cycle

Method test_cycle

test/orm/test_cycles.py:717–742  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

715 )
716
717 def test_cycle(self):
718 C2, C1, C1Data = (
719 self.classes.C2,
720 self.classes.C1,
721 self.classes.C1Data,
722 )
723
724 a = C1()
725 b = C2()
726 c = C1()
727 d = C2()
728 e = C2()
729 f = C2()
730 a.c2s.append(b)
731 d.c1s.append(c)
732 b.c1s.append(c)
733 a.data.append(C1Data(data="c1data1"))
734 a.data.append(C1Data(data="c1data2"))
735 c.data.append(C1Data(data="c1data3"))
736 sess = fixture_session()
737 sess.add_all((a, b, c, d, e, f))
738 sess.flush()
739
740 sess.delete(d)
741 sess.delete(c)
742 sess.flush()
743
744
745@testing.combinations(

Callers

nothing calls this directly

Calls 8

fixture_sessionFunction · 0.90
C1DataClass · 0.85
C1Class · 0.70
C2Class · 0.70
appendMethod · 0.45
add_allMethod · 0.45
flushMethod · 0.45
deleteMethod · 0.45

Tested by

no test coverage detected