Just a little more coverage.
authorTin Tvrtkovic <tinchester@gmail.com>
Wed, 28 May 2014 19:46:51 +0000 (21:46 +0200)
committerTin Tvrtkovic <tinchester@gmail.com>
Wed, 28 May 2014 19:50:41 +0000 (21:50 +0200)
tests/test_cached_property.py

index e836386224042a434b459e8b0c45af7a9e379602..d39778a3f16c2026c563b0d0d979948d49e2a0a6 100755 (executable)
@@ -44,6 +44,10 @@ class TestCachedProperty(unittest.TestCase):
         self.assertEqual(c.add_cached, 1)
         self.assertEqual(c.add_cached, 1)
 
+        # It's customary for descriptors to return themselves if accessed
+        # though the class, rather than through an instance.
+        self.assertTrue(isinstance(Check.add_cached, cached_property))
+
     def test_reset_cached_property(self):
 
         class Check(object):