    def test_textbox_hide_cursor(self):
        """
        Check hide cursor works as expected.
        """
        # Now set up the Frame ready for testing
        screen = MagicMock(spec=Screen, colours=8, unicode_aware=False)
        scene = Scene([], duration=-1)
        canvas = Canvas(screen, 10, 40, 0, 0)
        form = Frame(canvas, canvas.height, canvas.width)
        layout = Layout([100])
        form.add_layout(layout)
        textbox = TextBox(4, label="TB")
        layout.add_widget(textbox)
        form.fix()
        scene.add_effect(form)
        scene.reset()

        # Check we default to showing the cursor.
        self.assertFalse(textbox.hide_cursor)

        # Check that the cursor is hidden when set off.
        for effect in scene.effects:
            effect.update(0)
        self.assertEqual(canvas.get_from(4, 1),
                         (32, Screen.COLOUR_WHITE, Screen.A_REVERSE, Screen.COLOUR_CYAN))
        textbox.hide_cursor = True
        for effect in scene.effects:
            effect.update(1)
        self.assertEqual(canvas.get_from(4, 1),
                         (32, Screen.COLOUR_WHITE, Screen.A_BOLD, Screen.COLOUR_CYAN))
Check hide cursor works as expected.
tests/test_widgets.py