diff options
author | Tyler Smart <40041862+tjsmart@users.noreply.github.com> | 2023-08-18 15:44:38 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-18 15:44:38 (GMT) |
commit | 9bb576cb07b42f34fd882b8502642b024f771c62 (patch) | |
tree | d71855e0af7ce5382493849fdd9b2ca7cf34ca29 /Lib/test/test_functools.py | |
parent | 28cab71f954f3a14de9f474ce9c4abbd23c97862 (diff) | |
download | cpython-9bb576cb07b42f34fd882b8502642b024f771c62.zip cpython-9bb576cb07b42f34fd882b8502642b024f771c62.tar.gz cpython-9bb576cb07b42f34fd882b8502642b024f771c62.tar.bz2 |
gh-107995: Fix doctest collection of functools.cached_property objects (#107996)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Diffstat (limited to 'Lib/test/test_functools.py')
-rw-r--r-- | Lib/test/test_functools.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_functools.py b/Lib/test/test_functools.py index 50770f0..5ba7f51 100644 --- a/Lib/test/test_functools.py +++ b/Lib/test/test_functools.py @@ -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): |