MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / test_expire_lots

Method test_expire_lots

test/aaa_profiling/test_orm.py:547–561  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

545 # the profiling count depends on weakref callbacks being GC'ed
546 @testing.add_to_marker.gc_intensive
547 def test_expire_lots(self):
548 Parent, Child = self.classes.Parent, self.classes.Child
549 obj = [
550 Parent(children=[Child() for j in range(10)]) for i in range(10)
551 ]
552
553 sess = fixture_session()
554 sess.add_all(obj)
555 sess.flush()
556
557 @profiling.function_call_count()
558 def go():
559 sess.expire_all()
560
561 go()
562
563
564class QueryTest(NoCache, fixtures.MappedTest):

Callers

nothing calls this directly

Calls 6

fixture_sessionFunction · 0.90
ParentClass · 0.70
ChildClass · 0.70
goFunction · 0.70
add_allMethod · 0.45
flushMethod · 0.45

Tested by

no test coverage detected