The previous changeset restored some sanity. The behaviour in
`test_errors_raised_on_commit` is not inconsistent with the non-pipeline
mode because the two are not comparable: in non-pipeline mode the
exception is raised by `execute()`, not by `commit()`. If an exception
is raised in `commit()` itself, it is already handled consistently, as
`test_error_on_commit` shows.
conn.execute("select 1 from nosuchtable")
with pytest.raises(e.UndefinedTable):
conn.commit()
- conn.rollback() # TODO: inconsistent with non-pipeline.
+ conn.rollback()
cur1 = conn.execute("select 1")
cur2 = conn.execute("select 2")
with conn.transaction():
conn.execute("select 1 from nosuchtable")
here = True
- conn.rollback() # TODO: inconsistent with non-pipeline.
cur1 = conn.execute("select 1")
assert here
cur2 = conn.execute("select 2")
await aconn.execute("select 1 from nosuchtable")
with pytest.raises(e.UndefinedTable):
await aconn.commit()
- await aconn.rollback() # TODO: inconsistent with non-pipeline.
+ await aconn.rollback()
cur1 = await aconn.execute("select 1")
cur2 = await aconn.execute("select 2")
async with aconn.transaction():
await aconn.execute("select 1 from nosuchtable")
here = True
- await aconn.rollback() # TODO: inconsistent with non-pipeline.
cur1 = await aconn.execute("select 1")
assert here
cur2 = await aconn.execute("select 2")