MCPcopy Create free account
hub / github.com/python/cpython / test_timeout_expired

Method test_timeout_expired

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

Source from the content-addressed store, hash-verified

340 cm.reschedule(0.02)
341
342 async def test_timeout_expired(self):
343 with self.assertRaises(TimeoutError):
344 async with asyncio.timeout(0.01) as cm:
345 await asyncio.sleep(1)
346 with self.assertRaisesRegex(RuntimeError, "expired"):
347 cm.reschedule(0.02)
348
349 async def test_timeout_expiring(self):
350 async with asyncio.timeout(0.01) as cm:

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected