(self)
| 81 | self.assertIsNone(cm.when()) |
| 82 | |
| 83 | async def test_timeout_zero(self): |
| 84 | loop = asyncio.get_running_loop() |
| 85 | t0 = loop.time() |
| 86 | with self.assertRaises(TimeoutError): |
| 87 | async with asyncio.timeout(0) as cm: |
| 88 | await asyncio.sleep(10) |
| 89 | t1 = loop.time() |
| 90 | self.assertTrue(cm.expired()) |
| 91 | self.assertTrue(t0 <= cm.when() <= t1) |
| 92 | |
| 93 | async def test_timeout_zero_sleep_zero(self): |
| 94 | loop = asyncio.get_running_loop() |
nothing calls this directly
no test coverage detected