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

Method test_prepare_18_empty_result

tests/test_prepare.py:350–359  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

348 self.assertEqual(await st.fetchval(), 1)
349
350 async def test_prepare_18_empty_result(self):
351 # test EmptyQueryResponse protocol message
352 st = await self.con.prepare('')
353 self.assertEqual(await st.fetch(), [])
354 self.assertIsNone(await st.fetchval())
355 self.assertIsNone(await st.fetchrow())
356
357 self.assertEqual(await self.con.fetch(''), [])
358 self.assertIsNone(await self.con.fetchval(''))
359 self.assertIsNone(await self.con.fetchrow(''))
360
361 async def test_prepare_19_concurrent_calls(self):
362 st = self.loop.create_task(self.con.fetchval(

Callers

nothing calls this directly

Calls 4

prepareMethod · 0.45
fetchMethod · 0.45
fetchvalMethod · 0.45
fetchrowMethod · 0.45

Tested by

no test coverage detected