(self)
| 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 | |
| 564 | class QueryTest(NoCache, fixtures.MappedTest): |