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

Method outer

Lib/test/test_asyncio/test_taskgroups.py:918–926  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

916 self.fail("Sleep after group should have been cancelled")
917
918 async def outer():
919 t = asyncio.create_task(inner())
920 await event.wait()
921 self.assertEqual(t.cancelling(), 0)
922 t.cancel()
923 self.assertEqual(t.cancelling(), 1)
924 with self.assertRaises(asyncio.CancelledError):
925 await t
926 self.assertTrue(t.cancelled())
927
928 await outer()
929

Callers

nothing calls this directly

Calls 9

cancellingMethod · 0.80
assertTrueMethod · 0.80
innerFunction · 0.50
create_taskMethod · 0.45
waitMethod · 0.45
assertEqualMethod · 0.45
cancelMethod · 0.45
assertRaisesMethod · 0.45
cancelledMethod · 0.45

Tested by

no test coverage detected