def test_setEndAction(self): animation = Animation(ClockDummy(1), ["img1", "img2", "img3"], [1, 1, 1]) self.assertIsNone(animation.getEndAction()) action = lambda: None animation.setEndAction(action) self.assertEqual(animation.getEndAction(), action)
def test_callEndAction(self): animation = Animation(ClockDummy(1), ["img1", "img2", "img3"], [1, 1, 1]) animation.callEndAction() self.assertIsNone(animation.getEndAction()) animation.setEndAction(lambda: None) animation.callEndAction() self.assertIsNone(animation.getEndAction())