    def test_print_clear(self):
        """
        Check that clear option works on Print.
        """
        # Check that Stars randomly updates the Screen every frame.
        screen = MagicMock(spec=Screen, colours=8, unicode_aware=False)
        canvas = Canvas(screen, 10, 40, 0, 0)
        effect = Print(canvas, StaticRenderer(images=["hello"]), 2, 1, clear=True, stop_frame=20)
        effect.reset()
        self.assert_blank(canvas)
        my_buffer = [[(32, 7, 0, 0) for _ in range(40)] for _ in range(10)]

        # Should only update on first iteration
        for i in range(20):
            effect.update(i)
            self.assertEqual(self.check_canvas(
                canvas,
                my_buffer,
                lambda value: self.assertIn(chr(value[0]), " helo")), i in (0,19), f"Stopped on {i}")

        # Should be clear by now.
        self.assert_blank(canvas)
Check that clear option works on Print.
tests/test_effects.py