def skip_if_fake(func):
 def _skipper(*args, **kw):
  'Wrapped skipper function.'
  if FLAGS.fake_tests:
   raise unittest.SkipTest('Test cannot be run in fake mode')
  else:
   return func(*args, **kw)
 return _skipper

def skip_if_fake ( func ) : def _skipper ( * args , ** kw ) : if FLAGS . fake_tests : raise unittest . SkipTest ( 'Test cannot be run in fake mode' ) else : return func ( * args , ** kw ) return _skipper
decorator that skips a test if running in fake mode .