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

Method test_handle

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

Source from the content-addressed store, hash-verified

2387 self.loop.get_debug.return_value = True
2388
2389 def test_handle(self):
2390 def callback(*args):
2391 return args
2392
2393 args = ()
2394 h = asyncio.Handle(callback, args, self.loop)
2395 self.assertIs(h._callback, callback)
2396 self.assertIs(h._args, args)
2397 self.assertFalse(h.cancelled())
2398
2399 h.cancel()
2400 self.assertTrue(h.cancelled())
2401
2402 def test_callback_with_exception(self):
2403 def callback():

Callers

nothing calls this directly

Calls 5

cancelledMethod · 0.95
cancelMethod · 0.95
assertFalseMethod · 0.80
assertTrueMethod · 0.80
assertIsMethod · 0.45

Tested by

no test coverage detected