Skip to content

Skip surface tests that fail when SDL_VIDEODRIVER=dummy#4169

Merged
illume merged 1 commit into
pygame:mainfrom
emilytrau:surface-tests
Mar 30, 2024
Merged

Skip surface tests that fail when SDL_VIDEODRIVER=dummy#4169
illume merged 1 commit into
pygame:mainfrom
emilytrau:surface-tests

Conversation

@emilytrau
Copy link
Copy Markdown
Contributor

@emilytrau emilytrau commented Mar 5, 2024

Pygame was failing to build in nixpkgs and needed this patch.

Please note that I haven't been able to test this change outside of the nixpkgs build infrastructure.

@bnavigator
Copy link
Copy Markdown

Same error on openSUSE:

[  495s] ======================================================================
[  495s] FAIL: test_convert_alpha_init (pygame.tests.surface_test.GeneralSurfaceTests)
[  495s] Ensure initialization exceptions are raised
[  495s] ----------------------------------------------------------------------
[  495s] pygame.error: Parameter 'surface' is invalid
[  495s] 
[  495s] During handling of the above exception, another exception occurred:
[  495s] 
[  495s] Traceback (most recent call last):
[  495s]   File "/home/abuild/rpmbuild/BUILDROOT/python-pygame-2.5.2-69.44.x86_64/usr/lib64/python3.9/site-packages/pygame/tests/surface_test.py", line 1131, in test_convert_alpha_init
[  495s]     self.assertRaisesRegex(pygame.error, "No video mode", surf.convert_alpha)
[  495s] AssertionError: "No video mode" does not match "Parameter 'surface' is invalid"
[  495s] 
[  495s] ======================================================================
[  495s] FAIL: test_convert_init (pygame.tests.surface_test.GeneralSurfaceTests)
[  495s] Ensure initialization exceptions are raised
[  495s] ----------------------------------------------------------------------
[  495s] pygame.error: Parameter 'surface' is invalid
[  495s] 
[  495s] During handling of the above exception, another exception occurred:
[  495s] 
[  495s] Traceback (most recent call last):
[  495s]   File "/home/abuild/rpmbuild/BUILDROOT/python-pygame-2.5.2-69.44.x86_64/usr/lib64/python3.9/site-packages/pygame/tests/surface_test.py", line 1111, in test_convert_init
[  495s]     self.assertRaisesRegex(pygame.error, "No video mode", surf.convert)
[  495s] AssertionError: "No video mode" does not match "Parameter 'surface' is invalid"

Without the patch the test throws "pygame.error: Parameter 'surface' is invalid" instead of the expected "No video mode" when SDL_VIDEODRIVER=dummy.

Not sure if glossing over this by the patch is the right fix.

bmwiedemann pushed a commit to bmwiedemann/openSUSE that referenced this pull request Mar 13, 2024
https://build.opensuse.org/request/show/1157037
by user mcepl + anag+factory
Forwarded request #1156382 from bnavigator

- Skip failing tests with dummy video driver on SDL2
    * Add pygame-pr4169-videodummytests.patch gh#pygame/pygame#4169
@illume
Copy link
Copy Markdown
Member

illume commented Mar 30, 2024

Thanks.

I wonder if the second one is an actual error. Probably with a buggy wayland/SDL2 interaction.

Copy link
Copy Markdown
Member

@illume illume left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉🎈

@illume illume merged commit bbdf409 into pygame:main Mar 30, 2024
@emilytrau emilytrau deleted the surface-tests branch March 30, 2024 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants