(self)
| 20 | self.assertTrue(cm.expired()) |
| 21 | |
| 22 | async def test_timeout_at_basic(self): |
| 23 | loop = asyncio.get_running_loop() |
| 24 | |
| 25 | with self.assertRaises(TimeoutError): |
| 26 | deadline = loop.time() + 0.01 |
| 27 | async with asyncio.timeout_at(deadline) as cm: |
| 28 | await asyncio.sleep(10) |
| 29 | self.assertTrue(cm.expired()) |
| 30 | self.assertEqual(deadline, cm.when()) |
| 31 | |
| 32 | async def test_nested_timeouts(self): |
| 33 | loop = asyncio.get_running_loop() |
nothing calls this directly
no test coverage detected