| 446 | |
| 447 | @skip_async |
| 448 | def test_autocommit_property(conn): |
| 449 | assert conn.autocommit is False |
| 450 | |
| 451 | conn.autocommit = True |
| 452 | assert conn.autocommit |
| 453 | cur = conn.cursor() |
| 454 | cur.execute("select 1") |
| 455 | assert cur.fetchone() == (1,) |
| 456 | assert conn.pgconn.transaction_status == pq.TransactionStatus.IDLE |
| 457 | |
| 458 | conn.autocommit = "" |
| 459 | assert isinstance(conn.autocommit, bool) |
| 460 | assert conn.autocommit is False |
| 461 | |
| 462 | conn.autocommit = "yeah" |
| 463 | assert isinstance(conn.autocommit, bool) |
| 464 | assert conn.autocommit is True |
| 465 | |
| 466 | |
| 467 | def test_autocommit_connect(conn_cls, dsn): |