@@ -1020,7 +1020,6 @@ def test_iter(self):
10201020 self .assertEqual (iterations , 5 )
10211021
10221022 def test_replace (self ):
1023- # print("replace start")
10241023 for bpp in (8 , 16 , 24 , 32 ):
10251024 sf = pygame .Surface ((10 , 10 ), 0 , bpp )
10261025 sf .fill ((255 , 0 , 0 ))
@@ -1041,10 +1040,13 @@ def test_replace(self):
10411040 self .assertEqual (ar [3 ][6 ], oval )
10421041 self .assertEqual (ar [8 ][9 ], oval )
10431042 self .assertEqual (ar [9 ][9 ], oval )
1044- # print("replace end")
1043+
1044+ for color in [(20 , 20 , 20 ), 10 , "green" , pygame .Color ("blue" )]:
1045+ sf = pygame .Surface ((10 , 10 ))
1046+ ar = pygame .PixelArray (sf )
1047+ ar .replace (color , color )
10451048
10461049 def test_extract (self ):
1047- # print("extract start")
10481050 for bpp in (8 , 16 , 24 , 32 ):
10491051 sf = pygame .Surface ((10 , 10 ), 0 , bpp )
10501052 sf .fill ((0 , 0 , 255 ))
@@ -1070,7 +1072,11 @@ def test_extract(self):
10701072 self .assertEqual (newar [3 ][6 ], white )
10711073 self .assertEqual (newar [8 ][9 ], black )
10721074 self .assertEqual (newar [9 ][9 ], black )
1073- # print("extract end")
1075+
1076+ for color in [(20 , 20 , 20 ), 10 , "green" , pygame .Color ("blue" )]:
1077+ sf = pygame .Surface ((10 , 10 ))
1078+ ar = pygame .PixelArray (sf )
1079+ ar .extract (color )
10741080
10751081 def test_2dslice_assignment (self ):
10761082 w = 2 * 5 * 8
0 commit comments