(self)
| 21 | class TestTimeout(tb.ConnectedTestCase): |
| 22 | |
| 23 | async def test_timeout_01(self): |
| 24 | for methname in {'fetch', 'fetchrow', 'fetchval', 'execute'}: |
| 25 | with self.assertRaises(asyncio.TimeoutError), \ |
| 26 | self.assertRunUnder(MAX_RUNTIME): |
| 27 | meth = getattr(self.con, methname) |
| 28 | await meth('select pg_sleep(10)', timeout=0.02) |
| 29 | self.assertEqual(await self.con.fetch('select 1'), [(1,)]) |
| 30 | |
| 31 | async def test_timeout_02(self): |
| 32 | st = await self.con.prepare('select pg_sleep(10)') |
nothing calls this directly
no test coverage detected