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

Method set_event_loop

Lib/test/test_asyncio/utils.py:538–544  ·  view source on GitHub ↗
(self, loop, *, cleanup=True)

Source from the content-addressed store, hash-verified

536 loop.close()
537
538 def set_event_loop(self, loop, *, cleanup=True):
539 if loop is None:
540 raise AssertionError('loop is None')
541 # ensure that the event loop is passed explicitly in asyncio
542 events.set_event_loop(None)
543 if cleanup:
544 self.addCleanup(self.close_loop, loop)
545
546 def new_test_loop(self, gen=None):
547 loop = TestLoop(gen)

Callers 15

new_test_loopMethod · 0.95
setUpMethod · 0.45
test_asyncio_1Method · 0.45
setUpMethod · 0.45
setUpMethod · 0.45
test_closeMethod · 0.45
setUpMethod · 0.45

Calls 1

addCleanupMethod · 0.95

Tested by 15

setUpMethod · 0.36
test_asyncio_1Method · 0.36
setUpMethod · 0.36
setUpMethod · 0.36
test_closeMethod · 0.36
setUpMethod · 0.36
setUpMethod · 0.36