'cached_property caches its value and that it behaves like a property'

def test_cached_property(self):

    class A:
        @cached_property
        def value(self):
            'Here    is    the    docstring...'
            return (1, object())
        def other_value(self):
            return 1
        other = cached_property(other_value, name='other')
    self.assertEqual(A.value.__doc__, 'Here    is    the    docstring...')
    a = A()
    self.assertEqual(a.value, a.value)
    self.assertEqual(a.value[0], 1)
    a2 = A()
    self.assertNotEqual(a.value, a2.value)
    self.assertIsInstance(A.value, cached_property)
    self.assertEqual(a.other, 1)
    self.assertTrue(callable(a.other_value))
