parent
c7f550a8be
commit
391ceda581
|
@ -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 = [
|
||||
|
@ -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
|
||||
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
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…
Reference in New Issue
Block a user