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

Method test_wait_for_unacquired

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

Source from the content-addressed store, hash-verified

560 self.assertTrue(t.result())
561
562 async def test_wait_for_unacquired(self):
563 cond = asyncio.Condition()
564
565 # predicate can return true immediately
566 res = await cond.wait_for(lambda: [1, 2, 3])
567 self.assertEqual([1, 2, 3], res)
568
569 with self.assertRaises(RuntimeError):
570 await cond.wait_for(lambda: False)
571
572 async def test_notify(self):
573 cond = asyncio.Condition()

Callers

nothing calls this directly

Calls 4

wait_forMethod · 0.95
ConditionMethod · 0.45
assertEqualMethod · 0.45
assertRaisesMethod · 0.45

Tested by

no test coverage detected