(conn)
| 201 | |
| 202 | |
| 203 | def test_cursor_closed(conn): |
| 204 | conn.close() |
| 205 | with pytest.raises(psycopg.OperationalError): |
| 206 | with conn.cursor("foo"): |
| 207 | pass |
| 208 | with pytest.raises(psycopg.OperationalError): |
| 209 | conn.cursor("foo") |
| 210 | with pytest.raises(psycopg.OperationalError): |
| 211 | conn.cursor() |
| 212 | |
| 213 | |
| 214 | # TODO: the INERROR started failing in the C implementation in Python 3.12a7 |