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