    def test_events(self):
        """
        Check event processing is queued correctly.
        """
        # Check that the scene passes events through to the effects
        effect1 = MockEffect()
        effect2 = MockEffect()
        scene = Scene([effect1, effect2], duration=10)
        scene.process_event(MouseEvent(10, 5, 0))
        self.assertTrue(effect1.event_called)
        self.assertTrue(effect2.event_called)

        # Check that the scene passes stops event processing when required
        effect1 = MockEffect()
        effect2 = MockEffect(swallow=True)
        scene = Scene([effect1, effect2], duration=10)
        scene.process_event(MouseEvent(10, 5, 0))
        self.assertFalse(effect1.event_called)
        self.assertTrue(effect2.event_called)
Check event processing is queued correctly.
tests/test_scene.py