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

Method test_context_manager

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

Source from the content-addressed store, hash-verified

273 self.assertFalse(lock.locked())
274
275 async def test_context_manager(self):
276 lock = asyncio.Lock()
277 self.assertFalse(lock.locked())
278
279 async with lock:
280 self.assertTrue(lock.locked())
281
282 self.assertFalse(lock.locked())
283
284
285class EventTests(unittest.IsolatedAsyncioTestCase):

Callers

nothing calls this directly

Calls 4

lockedMethod · 0.95
LockMethod · 0.80
assertFalseMethod · 0.80
assertTrueMethod · 0.80

Tested by

no test coverage detected