(conn)
| 427 | |
| 428 | |
| 429 | def test_autocommit(conn): |
| 430 | assert conn.autocommit is False |
| 431 | conn.set_autocommit(True) |
| 432 | assert conn.autocommit |
| 433 | cur = conn.cursor() |
| 434 | cur.execute("select 1") |
| 435 | assert cur.fetchone() == (1,) |
| 436 | assert conn.pgconn.transaction_status == pq.TransactionStatus.IDLE |
| 437 | |
| 438 | conn.set_autocommit("") |
| 439 | assert isinstance(conn.autocommit, bool) |
| 440 | assert conn.autocommit is False |
| 441 | |
| 442 | conn.set_autocommit("yeah") |
| 443 | assert isinstance(conn.autocommit, bool) |
| 444 | assert conn.autocommit is True |
| 445 | |
| 446 | |
| 447 | @skip_async |
nothing calls this directly
no test coverage detected
searching dependent graphs…