On 9/5/07, Daniel Larsson <[EMAIL PROTECTED]> wrote:
> Here's my two files again:
>
> # decorator.py
> import functools
>
> def simplelog(f):
> @functools.wraps(f)
> def new_f(*args, **kwds):
> print "Wrapper calling func"
> return f(*args, **kwds)
> return new_f
>
> # test.py
> from decorator import simplelog
>
> @simplelog
> def test():
> """
> This test should fail, since the decorator prints output. Seems I don't
> get called though
> >>> test()
> 'works!'
> """
> return "works!"
>
> if __name__ == '__main__':
> import doctest
> doctest.testmod()
>
Ok, I could not see the code before (Google groups as getting worse as
the time goes by). It looks like you are right, it is a bug in
doctest.
Michele Simionato
--
http://mail.python.org/mailman/listinfo/python-list