Ejemplo n.º 1
0
    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)
Ejemplo n.º 2
0
    def test_update_endAction_bigTimePassed(self):
        animation = Animation(ClockDummy(3), ["img1", "img2", "img3"], [1, 1, 1])
        callFunctionsVerifier = CallFunctionsVerifier()

        animation.setEndAction(callFunctionsVerifier.function1)

        animation.update()
        self.assertTrue(callFunctionsVerifier.called1)
Ejemplo n.º 3
0
    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())