MCPcopy
hub / github.com/MagicStack/asyncpg / test_standby_cursors

Method test_standby_cursors

tests/test_pool.py:1095–1104  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1093 await pool.close()
1094
1095 async def test_standby_cursors(self):
1096 con = await self.standby_cluster.connect(
1097 database='postgres', user='postgres', loop=self.loop)
1098
1099 try:
1100 async with con.transaction():
1101 cursor = await con.cursor('SELECT 1')
1102 self.assertEqual(await cursor.fetchrow(), (1,))
1103 finally:
1104 await con.close()

Callers

nothing calls this directly

Calls 5

transactionMethod · 0.80
connectMethod · 0.45
cursorMethod · 0.45
fetchrowMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected