def skip_distribution(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):
   distribution = environ.get('FLOCKER_ACCEPTANCE_DISTRIBUTION')
   if (distribution in unsupported):
    raise SkipTest("Distribution not supported: '{distribution}' ({reason}).".format(distribution=distribution, reason=reason))
   return test_method(test_case, *args, **kwargs)
  return wrapper
 return decorator

def skip_distribution ( unsupported , reason ) : def decorator ( test_method ) : @ wraps ( test_method ) def wrapper ( test_case , * args , ** kwargs ) : distribution = environ . get ( 'FLOCKER_ACCEPTANCE_DISTRIBUTION' ) if ( distribution in unsupported ) : raise SkipTest ( "Distribution not supported: '{distribution}' ({reason})." . format ( distribution = distribution , reason = reason ) ) return test_method ( test_case , * args , ** kwargs ) return wrapper return decorator
create decorator that skips a test if the distribution doesnt support the operations required by the test .