def testVirtualProtectedDtorOnCppCreatedObject(self): '''Original protected virtual destructor is being called for a C++ created object.''' dtor_called = ProtectedVirtualDestructor.dtorCalled() for i in range(1, 10): pvd = ProtectedVirtualDestructor.create() del pvd self.assertEqual(ProtectedVirtualDestructor.dtorCalled(), dtor_called + i)
def testVirtualProtectedDtor(self): '''Original protected virtual destructor is being called.''' dtor_called = ProtectedVirtualDestructor.dtorCalled() for i in range(1, 10): pvd = ProtectedVirtualDestructor() del pvd self.assertEqual(ProtectedVirtualDestructor.dtorCalled(), dtor_called + i)