@@ -6312,41 +6312,47 @@ class to add any draw.arc specific tests to.
63126312
63136313
63146314class DrawFloodFillMixin (unittest .TestCase ):
6315- """Mixin tests for flood fill.
6316- """
6315+ """Mixin tests for flood fill."""
63176316
63186317 def test_flood_fill (self ):
63196318 """Ensures flood fill fills with solid color"""
63206319 surf = pygame .Surface ((100 , 100 ))
6321- surf .fill ((0 ,0 ,0 ))
6322-
6323- pygame .draw .line (surf , (255 ,0 ,0 ), (10 ,10 ), (90 ,90 ), 5 )
6320+ surf .fill ((0 , 0 , 0 ))
63246321
6325- self .assertEqual (surf .get_at ((10 ,10 )), (255 ,0 ,0 ), "line drawing precondition" )
6326- self .assertEqual (surf .get_at ((90 ,90 )), (255 ,0 ,0 ), "line drawing precondition" )
6322+ pygame .draw .line (surf , (255 , 0 , 0 ), (10 , 10 ), (90 , 90 ), 5 )
63276323
6328- pygame .draw .flood_fill (surf , (255 ,255 ,255 ), (90 , 90 ))
6324+ self .assertEqual (
6325+ surf .get_at ((10 , 10 )), (255 , 0 , 0 ), "line drawing precondition"
6326+ )
6327+ self .assertEqual (
6328+ surf .get_at ((90 , 90 )), (255 , 0 , 0 ), "line drawing precondition"
6329+ )
63296330
6330- self .assertEqual (surf .get_at ((90 ,90 )), (255 ,255 ,255 ), "flood fill start point" )
6331- self .assertEqual (surf .get_at ((10 ,10 )), (255 ,255 ,255 ), "flood fill reaching the end" )
6331+ pygame .draw .flood_fill (surf , (255 , 255 , 255 ), (90 , 90 ))
63326332
6333+ self .assertEqual (
6334+ surf .get_at ((90 , 90 )), (255 , 255 , 255 ), "flood fill start point"
6335+ )
6336+ self .assertEqual (
6337+ surf .get_at ((10 , 10 )), (255 , 255 , 255 ), "flood fill reaching the end"
6338+ )
63336339
63346340 def test_flood_pattern (self ):
63356341 """Ensures flood fill fills in a pattern"""
63366342 surf = pygame .Surface ((100 , 100 ))
6337- surf .fill ((0 ,0 , 0 ))
6343+ surf .fill ((0 , 0 , 0 ))
63386344
63396345 pattern = pygame .Surface ((2 , 2 ))
6340- pattern .fill ((255 ,255 ,255 ))
6341- pattern .set_at ((0 ,0 ), (255 ,0 , 0 ))
6342- pattern .set_at ((1 ,1 ), (0 ,0 , 255 ))
6346+ pattern .fill ((255 , 255 , 255 ))
6347+ pattern .set_at ((0 , 0 ), (255 , 0 , 0 ))
6348+ pattern .set_at ((1 , 1 ), (0 , 0 , 255 ))
63436349
6344- pygame .draw .line (surf , (0 ,0 , 0 ), (5 ,95 ), (95 ,5 ))
6345- pygame .draw .line (surf , (0 ,0 , 0 ), (50 , 0 ), (50 ,95 ))
6350+ pygame .draw .line (surf , (0 , 0 , 0 ), (5 , 95 ), (95 , 5 ))
6351+ pygame .draw .line (surf , (0 , 0 , 0 ), (50 , 0 ), (50 , 95 ))
63466352
63476353 pygame .draw .flood_fill (surf , pattern , (95 , 95 ))
63486354
6349- for pt in [(0 ,0 ),(0 ,1 ),(1 ,0 ),(1 ,1 )]:
6355+ for pt in [(0 , 0 ), (0 , 1 ), (1 , 0 ), (1 , 1 )]:
63506356 self .assertEqual (surf .get_at (pt ), pattern .get_at (pt ), pt )
63516357
63526358
0 commit comments