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

Method test_prepare_28_max_args

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

Source from the content-addressed store, hash-verified

536 self.assertEqual(len(cache), 2)
537
538 async def test_prepare_28_max_args(self):
539 N = 32768
540 args = ','.join('${}'.format(i) for i in range(1, N + 1))
541 query = 'SELECT ARRAY[{}]'.format(args)
542
543 with self.assertRaisesRegex(
544 exceptions.InterfaceError,
545 'the number of query arguments cannot exceed 32767'):
546 await self.con.fetchval(query, *range(1, N + 1))
547
548 async def test_prepare_29_duplicates(self):
549 # In addition to test_record.py, let's have a full functional

Callers

nothing calls this directly

Calls 1

fetchvalMethod · 0.45

Tested by

no test coverage detected