def test_rollback(plugin, config, backup):
 try:
  plugin.rollback_checkpoints(1337)
 except le_errors.Error as error:
  logger.error('Plugin raised an exception during rollback:')
  logger.exception(error)
  return False
 if _dirs_are_unequal(config, backup):
  logger.error('Rollback failed for config `%s`', config)
  return False
 else:
  logger.info('Rollback succeeded')
  return True

def test_rollback ( plugin , config , backup ) : try : plugin . rollback_checkpoints ( 1337 ) except le_errors . Error as error : logger . error ( 'Plugin raised an exception during rollback:' ) logger . exception ( error ) return False if _dirs_are_unequal ( config , backup ) : logger . error ( 'Rollback failed for config `%s`' , config ) return False else : logger . info ( 'Rollback succeeded' ) return True
tests the rollback checkpoints function .