def testDeleteChild(self): '''Delete child in C++ should invalidate child - using C++ wrapper''' parent = ObjectType() parent.setObjectName('parent') child = ObjectType(parent) child.setObjectName('child') parent.killChild('child') self.assertRaises(RuntimeError, child.objectName) self.assertEqual(parent.objectName(), 'parent')