MCPcopy Index your code
hub / github.com/python/cpython / test_task_del_collect

Method test_task_del_collect

Lib/test/test_asyncio/test_tasks.py:137–148  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

135 self.assertEqual('my new message', cm.exception.args[0])
136
137 def test_task_del_collect(self):
138 class Evil:
139 def __del__(self):
140 gc.collect()
141
142 async def run():
143 return Evil()
144
145 self.loop.run_until_complete(
146 asyncio.gather(*[
147 self.new_task(self.loop, run()) for _ in range(100)
148 ]))
149
150 def test_other_loop_future(self):
151 other_loop = asyncio.new_event_loop()

Callers

nothing calls this directly

Calls 4

new_taskMethod · 0.95
runFunction · 0.50
run_until_completeMethod · 0.45
gatherMethod · 0.45

Tested by

no test coverage detected