@testing.requires.savepoints
def test_begin_begin_nested_rollback_commit(self):
    with testing.db.connect() as connection:
        trans = connection.begin()
        trans2 = connection.begin_nested()
        assert (connection.connection._reset_agent is trans)
        trans2.rollback()
        assert (connection.connection._reset_agent is trans)
        trans.commit()
        assert (connection.connection._reset_agent is None)
@testing.requires.savepoints
def test_begin_begin_nested_rollback_commit(self):
    with testing.db.connect() as connection:
        trans = connection.begin()
        trans2 = connection.begin_nested()
        assert (connection.connection._reset_agent is trans)
        trans2.rollback()
        assert (connection.connection._reset_agent is trans)
        trans.commit()
        assert (connection.connection._reset_agent is None)