    def test_banner(self):
        """
        Check that BannerText works.
        """
        # Check that banner redraws every frame.
        screen = MagicMock(spec=Screen, colours=8, unicode_aware=False)
        canvas = Canvas(screen, 10, 10, 0, 0)
        effect = BannerText(canvas, StaticRenderer(images=["hello"]), 2, 3)
        effect.reset()
        effect.update(0)
        self.assertEqual(canvas.get_from(canvas.width - 1, 2),
                         (ord("h"), 3, 0, 0))
        effect.update(1)
        self.assertEqual(canvas.get_from(canvas.width - 1, 2),
                         (ord("e"), 3, 0, 0))
        my_buffer = [[(32, 7, 0, 0) for _ in range(10)] for _ in range(10)]
        for i in range(2, 12):
            effect.update(i)
            self.assertTrue(self.check_canvas(
                canvas,
                my_buffer,
                lambda value: self.assertIn(chr(value[0]), " helo")))

        # Check there is some stop frame - will vary according to screen width
        self.assertGreater(effect.stop_frame, 0)

        # This effect should ignore events.
        event = object()
        self.assertEqual(event, effect.process_event(event))
Check that BannerText works.
tests/test_effects.py