MCPcopy Create free account
hub / github.com/MagicStack/asyncpg / test_execute_script_1

Method test_execute_script_1

tests/test_execute.py:17–27  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

15class TestExecuteScript(tb.ConnectedTestCase):
16
17 async def test_execute_script_1(self):
18 self.assertEqual(self.con._protocol.queries_count, 0)
19 status = await self.con.execute('''
20 SELECT 1;
21
22 SELECT true FROM pg_type WHERE false = true;
23
24 SELECT generate_series(0, 9);
25 ''')
26 self.assertEqual(self.con._protocol.queries_count, 1)
27 self.assertEqual(status, 'SELECT 10')
28
29 async def test_execute_script_2(self):
30 status = await self.con.execute('''

Callers

nothing calls this directly

Calls 1

executeMethod · 0.45

Tested by

no test coverage detected