Exemple #1
0
 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)
Exemple #2
0
 def tearDown(self):
     self.assertEqual(cacheSize(), 0)
Exemple #3
0
 def tearDown(self):
     self.assertEqual(cacheSize(), 0)
Exemple #4
0
 def tearDown(self):
     del self.obj
     self.assertEqual(cacheSize(), 0)
Exemple #5
0
 def tearDown(self):
     del self.obj
     self.assertEqual(cacheSize(), 0)