(self)
| 18 | class TestTimeout(tb.ConnectedTestCase): |
| 19 | |
| 20 | async def test_timeout_01(self): |
| 21 | for methname in {'fetch', 'fetchrow', 'fetchval', 'execute'}: |
| 22 | with self.assertRaises(asyncio.TimeoutError), \ |
| 23 | self.assertRunUnder(MAX_RUNTIME): |
| 24 | meth = getattr(self.con, methname) |
| 25 | await meth('select pg_sleep(10)', timeout=0.02) |
| 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)') |
nothing calls this directly
no test coverage detected