(conn, format)
| 376 | |
| 377 | @pytest.mark.parametrize("format", pq.Format) |
| 378 | def test_copy_in_error_empty(conn, format): |
| 379 | cur = conn.cursor() |
| 380 | ensure_table(cur, sample_tabledef) |
| 381 | with pytest.raises(ZeroDivisionError, match="mannaggiamiseria"): |
| 382 | with cur.copy(f"copy copy_in from stdin (format {format.name})"): |
| 383 | raise ZeroDivisionError("mannaggiamiseria") |
| 384 | |
| 385 | assert conn.info.transaction_status == pq.TransactionStatus.INERROR |
| 386 | |
| 387 | |
| 388 | def test_copy_in_buffers_with_pg_error(conn): |
nothing calls this directly
no test coverage detected