Skip to content

Commit 75d893c

Browse files
authored
Merge pull request #3687 from pygame-community/ankith26-sdl2-compat-skips
Fix latest sdl2-compat/sdl3 fails
2 parents 86268d7 + 4133601 commit 75d893c

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

test/draw_test.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7537,7 +7537,9 @@ def test_aafunctions_depth_segfault(self):
75377537
if depth == 8:
75387538
self.assertEqual(surf.get_at(pixel), pixel_colors_8[i])
75397539
elif depth == 16:
7540-
self.assertEqual(surf.get_at(pixel), pixel_colors_16[i])
7540+
# allow small delta difference to account for SDL3 changes.
7541+
for x, y in zip(surf.get_at(pixel), pixel_colors_16[i]):
7542+
self.assertAlmostEqual(x, y, delta=2)
75417543
else:
75427544
self.assertEqual(surf.get_at(pixel), pixel_colors_24_32[i])
75437545

test/surface_test.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,10 @@ def test_fill_rle(self):
300300
self.assertEqual(
301301
blit_surf.mustlock(), (blit_surf.get_flags() & pygame.RLEACCEL) != 0
302302
)
303-
self.assertTrue(blit_surf.get_flags() & pygame.RLEACCEL)
303+
if pygame.version.SDL < (2, 32, 50):
304+
# This bit fails on SDL2-compat and SDL3
305+
# https://github.com/libsdl-org/sdl2-compat/issues/575
306+
self.assertTrue(blit_surf.get_flags() & pygame.RLEACCEL)
304307

305308
def test_fill_raise_exceptions(self):
306309
surf = pygame.Surface((5, 5))

0 commit comments

Comments
 (0)