    def test_mouse_input(self):
        """
        Check that mouse input works.
        """
        def internal_checks(screen):
            # Inject a mouse move and check it is picked up
            self._inject_mouse(screen, 1, 2, 0)
            ev = screen.get_event()
            self.assertEqual(ev.x, 1)
            self.assertEqual(ev.y, 2)
            self.assertEqual(ev.buttons, 0)
            self.assertIsNone(screen.get_event())

            # Check left click
            self._inject_mouse(screen, 2, 3, MouseEvent.LEFT_CLICK)
            ev = screen.get_event()
            self.assertEqual(ev.x, 2)
            self.assertEqual(ev.y, 3)
            self.assertEqual(ev.buttons, MouseEvent.LEFT_CLICK)
            self.assertIsNone(screen.get_event())

            # Check right click
            self._inject_mouse(screen, 0, 0, MouseEvent.RIGHT_CLICK)
            ev = screen.get_event()
            self.assertEqual(ev.x, 0)
            self.assertEqual(ev.y, 0)
            self.assertEqual(ev.buttons, MouseEvent.RIGHT_CLICK)
            self.assertIsNone(screen.get_event())

            # Check double click
            self._inject_mouse(screen, 0, 0, MouseEvent.DOUBLE_CLICK)
            ev = screen.get_event()
            self.assertEqual(ev.x, 0)
            self.assertEqual(ev.y, 0)
            self.assertEqual(ev.buttons, MouseEvent.DOUBLE_CLICK)
            self.assertIsNone(screen.get_event())

        Screen.wrapper(internal_checks, height=15)
Check that mouse input works.
tests/test_screen.py