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

Method setUp

tornado/test/asyncio_test.py:210–218  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

208
209class AnyThreadEventLoopPolicyTest(unittest.TestCase):
210 def setUp(self):
211 setup_with_context_manager(self, ignore_deprecation())
212 # Referencing the event loop policy attributes raises deprecation warnings,
213 # so instead of importing this at the top of the file we capture it here.
214 self.AnyThreadEventLoopPolicy = (
215 tornado.platform.asyncio.AnyThreadEventLoopPolicy
216 )
217 self.orig_policy = asyncio.get_event_loop_policy()
218 self.executor = ThreadPoolExecutor(1)
219
220 def tearDown(self):
221 asyncio.set_event_loop_policy(self.orig_policy)

Callers

nothing calls this directly

Calls 2

ignore_deprecationFunction · 0.90

Tested by

no test coverage detected