Co-authored-by: Daniele Varrazzo <daniele.varrazzo@gmail.com>
def test_pipeline_errors_processed_at_exit(conn):
conn.autocommit = True
- with pytest.raises((e.OperationalError, e.UndefinedTable)):
+ with pytest.raises(e.UndefinedTable):
with conn.pipeline():
conn.execute("select * from nosuchtable")
conn.execute("create table voila ()")
async def test_pipeline_errors_processed_at_exit(aconn):
await aconn.set_autocommit(True)
- with pytest.raises((e.OperationalError, e.UndefinedTable)):
+ with pytest.raises(e.UndefinedTable):
async with aconn.pipeline():
await aconn.execute("select * from nosuchtable")
await aconn.execute("create table voila ()")