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

Method test_timeout_not_called

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

Source from the content-addressed store, hash-verified

58 self.assertTrue(cancelled)
59
60 async def test_timeout_not_called(self):
61 loop = asyncio.get_running_loop()
62 async with asyncio.timeout(10) as cm:
63 await asyncio.sleep(0.01)
64 t1 = loop.time()
65
66 self.assertFalse(cm.expired())
67 self.assertGreater(cm.when(), t1)
68
69 async def test_timeout_disabled(self):
70 async with asyncio.timeout(None) as cm:

Callers

nothing calls this directly

Calls 7

assertFalseMethod · 0.80
expiredMethod · 0.80
assertGreaterMethod · 0.80
timeoutMethod · 0.45
sleepMethod · 0.45
timeMethod · 0.45
whenMethod · 0.45

Tested by

no test coverage detected