def test_animated_splash_set_frame(): """ Ensure the splash screen's pixmap is updated with the animation's current pixmap. """ mock_gif = mock.MagicMock() asplash = AnimatedSplash(mock_gif) asplash.setPixmap = mock.MagicMock() asplash.setMask = mock.MagicMock() asplash.set_frame() asplash.animation.currentPixmap.assert_called_once_with() pixmap = asplash.animation.currentPixmap() asplash.setPixmap.assert_called_once_with(pixmap) asplash.setMask.assert_called_once_with(pixmap.mask())
def test_animated_splash_set_frame(): """ Ensure the splash screen's pixmap is updated with the animation's current pixmap. """ test_animation = load_movie("splash_screen") test_animation.frameChanged = mock.MagicMock() test_animation.start = mock.MagicMock() asplash = AnimatedSplash(test_animation) asplash.setPixmap = mock.MagicMock() asplash.setMask = mock.MagicMock() test_animation.currentPixmap = mock.MagicMock() asplash.set_frame() asplash.animation.currentPixmap.assert_called_once_with() pixmap = asplash.animation.currentPixmap() asplash.setPixmap.assert_called_once_with(pixmap) asplash.setMask.assert_called_once_with(pixmap.mask())