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

Method test_repr

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

Source from the content-addressed store, hash-verified

26class LockTests(unittest.IsolatedAsyncioTestCase):
27
28 async def test_repr(self):
29 lock = asyncio.Lock()
30 self.assertEndsWith(repr(lock), '[unlocked]>')
31 self.assertTrue(RGX_REPR.match(repr(lock)))
32
33 await lock.acquire()
34 self.assertEndsWith(repr(lock), '[locked]>')
35 self.assertTrue(RGX_REPR.match(repr(lock)))
36
37 async def test_lock(self):
38 lock = asyncio.Lock()

Callers

nothing calls this directly

Calls 5

acquireMethod · 0.95
LockMethod · 0.80
assertEndsWithMethod · 0.80
assertTrueMethod · 0.80
matchMethod · 0.45

Tested by

no test coverage detected