def feed_data(func, new_name, *args, **kwargs):
 @wraps(func)
 def wrapper(self):
  return func(self, *args, **kwargs)
 wrapper.__name__ = new_name
 if func.__doc__:
  try:
   wrapper.__doc__ = func.__doc__.format(*args, **kwargs)
  except (IndexError, KeyError):
   pass
 return wrapper

def feed_data ( func , new_name , * args , ** kwargs ) : @ wraps ( func ) def wrapper ( self ) : return func ( self , * args , ** kwargs ) wrapper . __name__ = new_name if func . __doc__ : try : wrapper . __doc__ = func . __doc__ . format ( * args , ** kwargs ) except ( IndexError , KeyError ) : pass return wrapper
this internal method decorator feeds the test data item to the test .