@@ -515,6 +515,10 @@ def test_quit__multiple(self):
515
515
os .environ .get ("SDL_VIDEODRIVER" ) == pygame .NULL_VIDEODRIVER ,
516
516
"Needs a non-null videodriver" ,
517
517
)
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
+ )
518
522
def test_set_gamma (self ):
519
523
pygame .display .set_mode ((1 , 1 ))
520
524
@@ -529,6 +533,10 @@ def test_set_gamma(self):
529
533
os .environ .get ("SDL_VIDEODRIVER" ) == pygame .NULL_VIDEODRIVER ,
530
534
"Needs a non-null videodriver" ,
531
535
)
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
+ )
532
540
def test_set_gamma__tuple (self ):
533
541
pygame .display .set_mode ((1 , 1 ))
534
542
@@ -538,8 +546,8 @@ def test_set_gamma__tuple(self):
538
546
self .assertEqual (pygame .display .set_gamma (r , g , b ), True )
539
547
540
548
@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 " ,
543
551
)
544
552
def test_set_gamma_ramp (self ):
545
553
# __doc__ (as of 2008-08-02) for pygame.display.set_gamma_ramp:
@@ -872,6 +880,10 @@ def test_set_icon_interactive(self):
872
880
self .assertTrue (response )
873
881
pygame .display .quit ()
874
882
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
+ )
875
887
def test_set_gamma_ramp (self ):
876
888
os .environ ["SDL_VIDEO_WINDOW_POS" ] = "100,250"
877
889
pygame .display .quit ()
0 commit comments