(conn)
| 265 | |
| 266 | |
| 267 | def 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 | |
| 278 | def test_copy_in_error(conn): |