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

Method test_copy_from_query_to_bad_output

tests/test_copy.py:223–232  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

221 )
222
223 async def test_copy_from_query_to_bad_output(self):
224 with self.assertRaisesRegex(TypeError, 'output is expected to be'):
225 await self.con.copy_from_query('''
226 SELECT
227 i, i * 10
228 FROM
229 generate_series(1, 5) AS i
230 WHERE
231 i = $1
232 ''', 3, output=1)
233
234 async def test_copy_from_query_to_sink(self):
235 with tempfile.NamedTemporaryFile() as f:

Callers

nothing calls this directly

Calls 1

copy_from_queryMethod · 0.45

Tested by

no test coverage detected