(self)
| 26 | self.assertEqual(await self.con.fetch('select 1'), [(1,)]) |
| 27 | |
| 28 | async def test_timeout_02(self): |
| 29 | st = await self.con.prepare('select pg_sleep(10)') |
| 30 | |
| 31 | for methname in {'fetch', 'fetchrow', 'fetchval'}: |
| 32 | with self.assertRaises(asyncio.TimeoutError), \ |
| 33 | self.assertRunUnder(MAX_RUNTIME): |
| 34 | meth = getattr(st, methname) |
| 35 | await meth(timeout=0.02) |
| 36 | self.assertEqual(await self.con.fetch('select 1'), [(1,)]) |
| 37 | |
| 38 | async def test_timeout_03(self): |
| 39 | task = self.loop.create_task( |
nothing calls this directly
no test coverage detected