From dbf7a3df45e733c1e51d98318fd87de5ffc160a8 Mon Sep 17 00:00:00 2001 From: John-Scott Atlakson Date: Sun, 19 Oct 2014 18:34:35 -0400 Subject: Fixed #23688 -- Updated cached_property to preserve docstring of original function --- tests/utils_tests/test_functional.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests/utils_tests') diff --git a/tests/utils_tests/test_functional.py b/tests/utils_tests/test_functional.py index e9010b3135..b806be0b16 100644 --- a/tests/utils_tests/test_functional.py +++ b/tests/utils_tests/test_functional.py @@ -50,6 +50,7 @@ class FunctionalTestCase(unittest.TestCase): @cached_property def value(self): + """Here is the docstring...""" return 1, object() def other_value(self): @@ -57,6 +58,9 @@ class FunctionalTestCase(unittest.TestCase): other = cached_property(other_value, name='other') + # docstring should be preserved + self.assertEqual(A.value.__doc__, "Here is the docstring...") + a = A() # check that it is cached -- cgit v1.3