(self)
| 39 | self.assertEqual(await self.con.fetch('select 1'), [(1,)]) |
| 40 | |
| 41 | async def test_timeout_03(self): |
| 42 | task = self.loop.create_task( |
| 43 | self.con.fetch('select pg_sleep(10)', timeout=0.2)) |
| 44 | await asyncio.sleep(0.05) |
| 45 | task.cancel() |
| 46 | with self.assertRaises(asyncio.CancelledError), \ |
| 47 | self.assertRunUnder(MAX_RUNTIME): |
| 48 | await task |
| 49 | self.assertEqual(await self.con.fetch('select 1'), [(1,)]) |
| 50 | |
| 51 | async def test_timeout_04(self): |
| 52 | st = await self.con.prepare('select pg_sleep(10)', timeout=0.1) |
nothing calls this directly
no test coverage detected