MCPcopy Create free account
hub / github.com/EasyIME/PIME / setUp

Method setUp

python/python3/tornado/test/testing_test.py:346–356  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

344 return ioloop.IOLoop.current()
345
346 def setUp(self):
347 # This simulates the effect of an asyncio test harness like
348 # pytest-asyncio.
349 with ignore_deprecation():
350 try:
351 self.orig_loop = asyncio.get_event_loop()
352 except RuntimeError:
353 self.orig_loop = None # type: ignore[assignment]
354 self.new_loop = asyncio.new_event_loop()
355 asyncio.set_event_loop(self.new_loop)
356 super().setUp()
357
358 def tearDown(self):
359 super().tearDown()

Callers

nothing calls this directly

Calls 3

ignore_deprecationFunction · 0.90
get_event_loopMethod · 0.80
setUpMethod · 0.45

Tested by

no test coverage detected