@@ -515,6 +515,10 @@ def test_quit__multiple(self):
515515 os .environ .get ("SDL_VIDEODRIVER" ) == pygame .NULL_VIDEODRIVER ,
516516 "Needs a non-null videodriver" ,
517517 )
518+ @unittest .skipIf (
519+ pygame .version .SDL >= (2 , 32 , 50 ),
520+ "set_gamma is removed in SDL3, does not work in sdl2-compat either" ,
521+ )
518522 def test_set_gamma (self ):
519523 pygame .display .set_mode ((1 , 1 ))
520524
@@ -529,6 +533,10 @@ def test_set_gamma(self):
529533 os .environ .get ("SDL_VIDEODRIVER" ) == pygame .NULL_VIDEODRIVER ,
530534 "Needs a non-null videodriver" ,
531535 )
536+ @unittest .skipIf (
537+ pygame .version .SDL >= (2 , 32 , 50 ),
538+ "set_gamma is removed in SDL3, does not work in sdl2-compat either" ,
539+ )
532540 def test_set_gamma__tuple (self ):
533541 pygame .display .set_mode ((1 , 1 ))
534542
@@ -538,8 +546,8 @@ def test_set_gamma__tuple(self):
538546 self .assertEqual (pygame .display .set_gamma (r , g , b ), True )
539547
540548 @unittest .skipIf (
541- not hasattr ( pygame .display , "set_gamma_ramp" ),
542- "Not all systems and hardware support gamma ramps " ,
549+ pygame .version . SDL >= ( 2 , 32 , 50 ),
550+ "set_gamma_ramp is removed in SDL3, does not work in sdl2-compat either " ,
543551 )
544552 def test_set_gamma_ramp (self ):
545553 # __doc__ (as of 2008-08-02) for pygame.display.set_gamma_ramp:
@@ -872,6 +880,10 @@ def test_set_icon_interactive(self):
872880 self .assertTrue (response )
873881 pygame .display .quit ()
874882
883+ @unittest .skipIf (
884+ pygame .version .SDL >= (2 , 32 , 50 ),
885+ "set_gamma_ramp is removed in SDL3, does not work in sdl2-compat either" ,
886+ )
875887 def test_set_gamma_ramp (self ):
876888 os .environ ["SDL_VIDEO_WINDOW_POS" ] = "100,250"
877889 pygame .display .quit ()
0 commit comments