Loading pkgs/development/python-modules/pygame/default.nix +4 −3 Original line number Diff line number Diff line Loading @@ -59,12 +59,14 @@ buildPythonPackage rec { "${lib.getLib dep}/lib" ]) buildInputs); }) # Skip tests that should be disabled without video driver ./skip-surface-tests.patch ]; postPatch = '' substituteInPlace src_py/sysfont.py \ --replace 'path="fc-list"' 'path="${fontconfig}/bin/fc-list"' \ --replace /usr/X11/bin/fc-list ${fontconfig}/bin/fc-list --replace-fail 'path="fc-list"' 'path="${fontconfig}/bin/fc-list"' \ --replace-fail /usr/X11/bin/fc-list ${fontconfig}/bin/fc-list ''; nativeBuildInputs = [ Loading Loading @@ -102,7 +104,6 @@ buildPythonPackage rec { # No audio or video device in test environment export SDL_VIDEODRIVER=dummy export SDL_AUDIODRIVER=disk export SDL_DISKAUDIOFILE=/dev/null ${python.interpreter} -m pygame.tests -v --exclude opengl,timing --time_out 300 Loading pkgs/development/python-modules/pygame/skip-surface-tests.patch 0 → 100644 +26 −0 Original line number Diff line number Diff line diff --git a/test/surface_test.py b/test/surface_test.py index 5ce78b6e..8b8f7ed5 100644 --- a/test/surface_test.py +++ b/test/surface_test.py @@ -1091,6 +1091,10 @@ class GeneralSurfaceTests(unittest.TestCase): finally: pygame.display.quit() + @unittest.skipIf( + os.environ.get("SDL_VIDEODRIVER") == "dummy", + 'requires a non-"dummy" SDL_VIDEODRIVER', + ) def test_convert_init(self): """Ensure initialization exceptions are raised for surf.convert().""" @@ -1118,6 +1122,10 @@ class GeneralSurfaceTests(unittest.TestCase): finally: pygame.display.quit() + @unittest.skipIf( + os.environ.get("SDL_VIDEODRIVER") == "dummy", + 'requires a non-"dummy" SDL_VIDEODRIVER', + ) def test_convert_alpha_init(self): """Ensure initialization exceptions are raised for surf.convert_alpha().""" Loading
pkgs/development/python-modules/pygame/default.nix +4 −3 Original line number Diff line number Diff line Loading @@ -59,12 +59,14 @@ buildPythonPackage rec { "${lib.getLib dep}/lib" ]) buildInputs); }) # Skip tests that should be disabled without video driver ./skip-surface-tests.patch ]; postPatch = '' substituteInPlace src_py/sysfont.py \ --replace 'path="fc-list"' 'path="${fontconfig}/bin/fc-list"' \ --replace /usr/X11/bin/fc-list ${fontconfig}/bin/fc-list --replace-fail 'path="fc-list"' 'path="${fontconfig}/bin/fc-list"' \ --replace-fail /usr/X11/bin/fc-list ${fontconfig}/bin/fc-list ''; nativeBuildInputs = [ Loading Loading @@ -102,7 +104,6 @@ buildPythonPackage rec { # No audio or video device in test environment export SDL_VIDEODRIVER=dummy export SDL_AUDIODRIVER=disk export SDL_DISKAUDIOFILE=/dev/null ${python.interpreter} -m pygame.tests -v --exclude opengl,timing --time_out 300 Loading
pkgs/development/python-modules/pygame/skip-surface-tests.patch 0 → 100644 +26 −0 Original line number Diff line number Diff line diff --git a/test/surface_test.py b/test/surface_test.py index 5ce78b6e..8b8f7ed5 100644 --- a/test/surface_test.py +++ b/test/surface_test.py @@ -1091,6 +1091,10 @@ class GeneralSurfaceTests(unittest.TestCase): finally: pygame.display.quit() + @unittest.skipIf( + os.environ.get("SDL_VIDEODRIVER") == "dummy", + 'requires a non-"dummy" SDL_VIDEODRIVER', + ) def test_convert_init(self): """Ensure initialization exceptions are raised for surf.convert().""" @@ -1118,6 +1122,10 @@ class GeneralSurfaceTests(unittest.TestCase): finally: pygame.display.quit() + @unittest.skipIf( + os.environ.get("SDL_VIDEODRIVER") == "dummy", + 'requires a non-"dummy" SDL_VIDEODRIVER', + ) def test_convert_alpha_init(self): """Ensure initialization exceptions are raised for surf.convert_alpha()."""