decorators don't play nice with nose?
Michele Simionato
michele.simionato at gmail.com
Tue Apr 7 00:23:36 EDT 2009
On Apr 6, 11:11 pm, "Diez B. Roggisch" <de... at nospam.web.de> wrote:
> Nose works via the func_name parameter of a method/function.
>
> So when you decorate it, you need to make sure that is set properly. One
> option is to do something like this:
>
> from functools import wraps
>
> def my_decorator(f):
> @wraps(f)
> def _d(*args, **kwargs):
> return f(*args, **kwargs)
>
> return _d
Or you can use the decorator module: http://pypi.python.org/pypi/decorator
More information about the Python-list
mailing list