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

Method new_loop

Lib/test/test_asyncio/test_runners.py:44–58  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

42class BaseTest(unittest.TestCase):
43
44 def new_loop(self):
45 loop = asyncio.BaseEventLoop()
46 loop._process_events = mock.Mock()
47 # Mock waking event loop from select
48 loop._write_to_self = mock.Mock()
49 loop._write_to_self.return_value = None
50 loop._selector = mock.Mock()
51 loop._selector.select.return_value = ()
52 loop.shutdown_ag_run = False
53
54 async def shutdown_asyncgens():
55 loop.shutdown_ag_run = True
56 loop.shutdown_asyncgens = shutdown_asyncgens
57
58 return loop
59
60 def setUp(self):
61 super().setUp()

Callers 2

new_event_loopMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected