MCPcopy
hub / github.com/tornadoweb/tornado / test_explicit_asyncio_loop

Method test_explicit_asyncio_loop

tornado/test/ioloop_test.py:435–442  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

433 yield gen.multi([self.io_loop.run_in_executor(None, f) for i in range(2)])
434
435 def test_explicit_asyncio_loop(self):
436 asyncio_loop = asyncio.new_event_loop()
437 loop = IOLoop(asyncio_loop=asyncio_loop, make_current=False)
438 assert loop.asyncio_loop is asyncio_loop # type: ignore
439 with self.assertRaises(RuntimeError):
440 # Can't register two IOLoops with the same asyncio_loop
441 IOLoop(asyncio_loop=asyncio_loop, make_current=False)
442 loop.close()
443
444
445# Deliberately not a subclass of AsyncTestCase so the IOLoop isn't

Callers

nothing calls this directly

Calls 2

closeMethod · 0.95
IOLoopClass · 0.90

Tested by

no test coverage detected