MCPcopy
hub / github.com/psycopg/psycopg / test_copy_in_str

Function test_copy_in_str

tests/test_copy.py:267–275  ·  view source on GitHub ↗
(conn)

Source from the content-addressed store, hash-verified

265
266
267def test_copy_in_str(conn):
268 cur = conn.cursor()
269 ensure_table(cur, sample_tabledef)
270 with cur.copy("copy copy_in from stdin (format text)") as copy:
271 copy.write(sample_text.decode())
272
273 cur.execute("select * from copy_in order by 1")
274 data = cur.fetchall()
275 assert data == sample_records
276
277
278def test_copy_in_error(conn):

Callers

nothing calls this directly

Calls 6

ensure_tableFunction · 0.70
cursorMethod · 0.45
copyMethod · 0.45
writeMethod · 0.45
executeMethod · 0.45
fetchallMethod · 0.45

Tested by

no test coverage detected