[Twisted-Python] Naming test methods constructed with deferredGenerator - is it possible?

Marcin Kasperski Marcin.Kasperski at softax.com.pl
Fri Apr 28 07:33:28 MDT 2006


Dnia piątek, 28 kwietnia 2006 14:57, Mike Pelletier napisał:
> def defGen(f):
>   gen = defer.deferredGenerator(f)
>   gen.__name__ = f.__name__
>   gen.__doc__ = f.__doc__
>   return gen

Finally such one does the job:

def createDeferredGenerator(function):
    gen = defer.deferredGenerator(function)
    gen.__doc__ = function.__name__
    return gen




More information about the Twisted-Python mailing list