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

Method test_timeout_in_block

Lib/test/test_asyncio/test_locks.py:755–759  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

753 await wrong_loop_in_cond()
754
755 async def test_timeout_in_block(self):
756 condition = asyncio.Condition()
757 async with condition:
758 with self.assertRaises(asyncio.TimeoutError):
759 await asyncio.wait_for(condition.wait(), timeout=0.5)
760
761 async def test_cancelled_error_wakeup(self):
762 # Test that a cancelled error, received when awaiting wakeup,

Callers

nothing calls this directly

Calls 4

waitMethod · 0.95
ConditionMethod · 0.45
assertRaisesMethod · 0.45
wait_forMethod · 0.45

Tested by

no test coverage detected