def require_backend(required_backend):
 def decorator(undecorated_object):
  @wraps(undecorated_object)
  def wrapper(*args, **kwargs):
   config = get_blockdevice_config()
   configured_backend = config.pop('backend')
   skipper = skipUnless((configured_backend == required_backend), 'The backend in the supplied configuration is not suitable for this test. Found: {!r}. Required: {!r}.'.format(configured_backend, required_backend))
   decorated_object = skipper(undecorated_object)
   result = decorated_object(*args, **kwargs)
   return result
  return wrapper
 return decorator

def require_backend ( required_backend ) : def decorator ( undecorated_object ) : @ wraps ( undecorated_object ) def wrapper ( * args , ** kwargs ) : config = get_blockdevice_config ( ) configured_backend = config . pop ( 'backend' ) skipper = skipUnless ( ( configured_backend == required_backend ) , 'The backend in the supplied configuration is not suitable for this test. Found: {!r}. Required: {!r}.' . format ( configured_backend , required_backend ) ) decorated_object = skipper ( undecorated_object ) result = decorated_object ( * args , ** kwargs ) return result return wrapper return decorator
raise skiptest unless the functional test configuration has required_backend .