def skipWithClientIf(condition, reason):
 def client_pass(*args, **kwargs):
  pass
 def skipdec(obj):
  retval = unittest.skip(reason)(obj)
  if (not isinstance(obj, type)):
   retval.client_skip = (lambda f: client_pass)
  return retval
 def noskipdec(obj):
  if (not (isinstance(obj, type) or hasattr(obj, 'client_skip'))):
   obj.client_skip = (lambda f: f)
  return obj
 return (skipdec if condition else noskipdec)

def skipWithClientIf ( condition , reason ) : def client_pass ( * args , ** kwargs ) : pass def skipdec ( obj ) : retval = unittest . skip ( reason ) ( obj ) if ( not isinstance ( obj , type ) ) : retval . client_skip = ( lambda f : client_pass ) return retval def noskipdec ( obj ) : if ( not ( isinstance ( obj , type ) or hasattr ( obj , 'client_skip' ) ) ) : obj . client_skip = ( lambda f : f ) return obj return ( skipdec if condition else noskipdec )
skip decorated test if condition is true .