We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8b669d5 commit 4ef93b5Copy full SHA for 4ef93b5
1 file changed
Lib/test/test_functools.py
@@ -3561,6 +3561,13 @@ def test_cached(self):
3561
self.assertEqual(item.cost, 2)
3562
self.assertEqual(item.cost, 2) # not 3
3563
3564
+ item.cost = 42
3565
+ self.assertEqual(item.cost, 42)
3566
+
3567
+ del item.cost
3568
+ self.assertEqual(item.cost, 3)
3569
+ self.assertEqual(item.cost, 3) # not 4
3570
3571
def test_cached_attribute_name_differs_from_func_name(self):
3572
item = OptionallyCachedCostItem()
3573
self.assertEqual(item.get_cost(), 2)
0 commit comments