From fb8a321d672848852d7706b3c40156771e568084 Mon Sep 17 00:00:00 2001 From: Michele Simionato Date: Mon, 5 Apr 2021 06:32:54 +0200 Subject: [PATCH] Tested docstring preservation --- src/tests/test.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tests/test.py b/src/tests/test.py index 4743c23..ad45ca1 100644 --- a/src/tests/test.py +++ b/src/tests/test.py @@ -137,10 +137,12 @@ def example(*args, **kw): @example def func(**kw): + "Docstring" return kw # there is no confusion when passing args as a keyword argument self.assertEqual(func(args='a'), {'args': 'a'}) + self.assertEqual(func.__doc__, "Docstring") def test_decorator_factory(self): # similar to what IPython is doing in traitlets.config.application