mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
gh-107995: Fix doctest collection of functools.cached_property objects (#107996)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This commit is contained in:
parent
28cab71f95
commit
9bb576cb07
5 changed files with 22 additions and 0 deletions
|
@ -3105,6 +3105,9 @@ class TestCachedProperty(unittest.TestCase):
|
|||
def test_doc(self):
|
||||
self.assertEqual(CachedCostItem.cost.__doc__, "The cost of the item.")
|
||||
|
||||
def test_module(self):
|
||||
self.assertEqual(CachedCostItem.cost.__module__, CachedCostItem.__module__)
|
||||
|
||||
def test_subclass_with___set__(self):
|
||||
"""Caching still works for a subclass defining __set__."""
|
||||
class readonly_cached_property(py_functools.cached_property):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue