def no_debug_mode(fn):
 @functools.wraps(fn)
 def wrapped(*args, **kwargs):
  orig_mode = config.mode
  if (orig_mode in ['DebugMode', 'DEBUG_MODE']):
   config.mode = 'FAST_RUN'
  try:
   return fn(*args, **kwargs)
  finally:
   config.mode = orig_mode
 return wrapped

def no_debug_mode ( fn ) : @ functools . wraps ( fn ) def wrapped ( * args , ** kwargs ) : orig_mode = config . mode if ( orig_mode in [ 'DebugMode' , 'DEBUG_MODE' ] ) : config . mode = 'FAST_RUN' try : return fn ( * args , ** kwargs ) finally : config . mode = orig_mode return wrapped
a decorator used to say a test is too slow to run in debug mode .