=================================== FAILURES ===================================
____________________ TestSDLSurface.test_SDL_GetSetClipRect ____________________
self = <sdl2.test.surface_test.TestSDLSurface object at 0x7fff4f9b2140>
def test_SDL_GetSetClipRect(self):
rectlist = ((rect.SDL_Rect(0, 0, 0, 0), SDL_FALSE, True),
(rect.SDL_Rect(2, 2, 0, 0), SDL_FALSE, False),
(rect.SDL_Rect(2, 2, 5, 1), SDL_TRUE, True),
(rect.SDL_Rect(6, 5, 10, 3), SDL_TRUE, False),
(rect.SDL_Rect(0, 0, 10, 10), SDL_TRUE, True),
(rect.SDL_Rect(0, 0, -10, 10), SDL_FALSE, False),
(rect.SDL_Rect(0, 0, -10, -10), SDL_FALSE, False),
(rect.SDL_Rect(-10, -10, 10, 10), SDL_FALSE, False),
(rect.SDL_Rect(10, -10, 10, 10), SDL_FALSE, False),
(rect.SDL_Rect(10, 10, 10, 10), SDL_TRUE, False)
)
clip = rect.SDL_Rect()
sf = sdl2.SDL_CreateRGBSurface(0, 15, 15, 32, 0, 0, 0, 0)
assert isinstance(sf.contents, sdl2.SDL_Surface)
sdl2.SDL_GetClipRect(sf, byref(clip))
assert clip == rect.SDL_Rect(0, 0, 15, 15)
for r, clipsetval, cmpval in rectlist:
retval = sdl2.SDL_SetClipRect(sf, r)
sdl2.SDL_GetClipRect(sf, byref(clip))
err = "Could not set clip rect %s" % r
assert retval == clipsetval, "retval: " + err
> assert (clip == r) == cmpval, "clip: " + err
E AssertionError: clip: Could not set clip rect SDL_Rect(x=2, y=2, w=0, h=0)
E assert (SDL_Rect(x=2, y=2, w=0, h=0) == SDL_Rect(x=2, y=2, w=0, h=0)
E
E Use -v to get more diff) == False
sdl2/test/surface_test.py:493: AssertionError
=========================== short test summary info ============================
FAILED sdl2/test/surface_test.py::TestSDLSurface::test_SDL_GetSetClipRect - AssertionError: clip: Could not set clip rect SDL_Rect(x=2, y=2, w=0, h=0)
===== 1 failed, 773 passed, 324 skipped, 1 deselected, 3 xpassed in 11.64s =====
What doesn't work?
How To Reproduce
Build using nix
Platform (if relevant):
Linux 6.18.0-rc3 #1-NixOS SMP PREEMPT_DYNAMIC Tue Jan 1 00:00:00 UTC 1980 x86_64 GNU/LinuxPython 3.13.9sdl2-compat-2.32.58