(self)
| 14 | class TimeoutTests(unittest.IsolatedAsyncioTestCase): |
| 15 | |
| 16 | async def test_timeout_basic(self): |
| 17 | with self.assertRaises(TimeoutError): |
| 18 | async with asyncio.timeout(0.01) as cm: |
| 19 | await asyncio.sleep(10) |
| 20 | self.assertTrue(cm.expired()) |
| 21 | |
| 22 | async def test_timeout_at_basic(self): |
| 23 | loop = asyncio.get_running_loop() |
nothing calls this directly
no test coverage detected