diff --git a/test/mouse_test.py b/test/mouse_test.py index 6a94a8ecb5..2d3d226c4c 100644 --- a/test/mouse_test.py +++ b/test/mouse_test.py @@ -341,6 +341,10 @@ def test_set_visible__invalid_value(self): with self.assertRaises(TypeError): prev_visible = pygame.mouse.set_visible(invalid_value) + @unittest.skipIf( + os.environ.get("SDL_VIDEODRIVER", "") == "dummy", + "mouse.set_relative_mode requires non-null video driver", + ) def test_set_relative_mode(self): """Tests that set_relative_mode hides the cursor.""" pygame.mouse.set_visible(True) @@ -351,6 +355,10 @@ def test_set_relative_mode(self): visible = pygame.mouse.get_visible() self.assertEqual(visible, True) + @unittest.skipIf( + os.environ.get("SDL_VIDEODRIVER", "") == "dummy", + "mouse.set_relative_mode requires non-null video driver", + ) def test_get_relative_mode(self): """Tests that get_relative_mode correctly reports the relative mode""" pygame.mouse.set_relative_mode(True)