def testProtectedValueTypePropertyWrapperRegistration(self): '''Access colocated protected value type property.''' cache_size = cacheSize() point = Point(12, 34) obj = createProtectedProperty() obj.protectedValueTypeProperty self.assertEqual(obj.protectedValueTypeProperty.copy(), obj.protectedValueTypeProperty) obj.protectedValueTypeProperty = point self.assertEqual(obj.protectedValueTypeProperty, point) self.assertFalse(obj.protectedValueTypeProperty is point) pointProperty = obj.protectedValueTypeProperty self.assertTrue(obj.protectedValueTypeProperty is pointProperty) del obj, point, pointProperty self.assertEqual(cacheSize(), cache_size)
def tearDown(self): self.assertEqual(cacheSize(), 0)
def tearDown(self): del self.obj self.assertEqual(cacheSize(), 0)