def skip_backend(unsupported, reason):
 def decorator(test_method):
  '\n        :param test_method: The test method that should be skipped.\n        '
  @wraps(test_method)
  def wrapper(test_case, *args, **kwargs):
   backend = get_dataset_backend(test_case)
   if (backend in unsupported):
    raise SkipTest('Backend not supported: {backend} ({reason}).'.format(backend=backend, reason=reason))
   return test_method(test_case, *args, **kwargs)
  return wrapper
 return decorator

def skip_backend ( unsupported , reason ) : def decorator ( test_method ) : @ wraps ( test_method ) def wrapper ( test_case , * args , ** kwargs ) : backend = get_dataset_backend ( test_case ) if ( backend in unsupported ) : raise SkipTest ( 'Backend not supported: {backend} ({reason}).' . format ( backend = backend , reason = reason ) ) return test_method ( test_case , * args , ** kwargs ) return wrapper return decorator
create decorator that skips a test if the volume backend doesnt support the operations required by the test .