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

Method test_expire_lots

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

Source from the content-addressed store, hash-verified

537 # the profiling count depends on weakref callbacks being GC'ed
538 @testing.add_to_marker.gc_intensive
539 def test_expire_lots(self):
540 Parent, Child = self.classes.Parent, self.classes.Child
541 obj = [
542 Parent(children=[Child() for j in range(10)]) for i in range(10)
543 ]
544
545 sess = fixture_session()
546 sess.add_all(obj)
547 sess.flush()
548
549 @profiling.function_call_count()
550 def go():
551 sess.expire_all()
552
553 go()
554
555
556class 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