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

Method test_call_soon

Lib/test/test_asyncio/test_events.py:321–330  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

319 self.assertEqual(results, ['hello world'])
320
321 def test_call_soon(self):
322 results = []
323
324 def callback(arg1, arg2):
325 results.append((arg1, arg2))
326 self.loop.stop()
327
328 self.loop.call_soon(callback, 'hello', 'world')
329 self.loop.run_forever()
330 self.assertEqual(results, [('hello', 'world')])
331
332 def test_call_soon_threadsafe(self):
333 results = []

Callers

nothing calls this directly

Calls 3

call_soonMethod · 0.45
run_foreverMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected