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

Method test_timeout_expiring

Lib/test/test_asyncio/test_timeouts.py:349–354  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

347 cm.reschedule(0.02)
348
349 async def test_timeout_expiring(self):
350 async with asyncio.timeout(0.01) as cm:
351 with self.assertRaises(asyncio.CancelledError):
352 await asyncio.sleep(1)
353 with self.assertRaisesRegex(RuntimeError, "expiring"):
354 cm.reschedule(0.02)
355
356 async def test_timeout_not_entered(self):
357 cm = asyncio.timeout(0.01)

Callers

nothing calls this directly

Calls 5

assertRaisesRegexMethod · 0.80
rescheduleMethod · 0.80
timeoutMethod · 0.45
assertRaisesMethod · 0.45
sleepMethod · 0.45

Tested by

no test coverage detected