@@ -164,27 +164,30 @@ def test_draw_boxes_with_coloured_label_backgrounds():
164164    )
165165    expected  =  torch .as_tensor (np .array (Image .open (path ))).permute (2 , 0 , 1 )
166166    assert_equal (result , expected )
167-      
167+ 
168168
169169@pytest .mark .skipif (PILLOW_VERSION  <  (10 , 1 ), reason = "The reference image is only valid for PIL >= 10.1" ) 
170170def  test_draw_boxes_with_coloured_label_text_boxes ():
171171    img  =  torch .full ((3 , 100 , 100 ), 255 , dtype = torch .uint8 )
172172    labels  =  ["a" , "b" , "c" , "d" ]
173173    colors  =  ["green" , "#FF00FF" , (0 , 255 , 0 ), "red" ]
174174    label_colors  =  ["green" , "red" , (0 , 255 , 0 ), "#FF00FF" ]
175-     label_background_colors  =  ["white" , "black" , "yellow" , "blue" ]  
175+     label_background_colors  =  ["white" , "black" , "yellow" , "blue" ]
176176    result  =  utils .draw_bounding_boxes (
177-         img ,  
178-         boxes ,  
179-         labels = labels ,  
180-         colors = colors ,  
181-         fill = True ,  
177+         img ,
178+         boxes ,
179+         labels = labels ,
180+         colors = colors ,
181+         fill = True ,
182182        label_colors = label_colors ,
183183        label_background_colors = label_background_colors ,
184-         fill_labels = True 
184+         fill_labels = True , 
185185    )
186186    path  =  os .path .join (
187-         os .path .dirname (os .path .abspath (__file__ )), "assets" , "fakedata" , "draw_boxes_different_label_background_colors.png" 
187+         os .path .dirname (os .path .abspath (__file__ )),
188+         "assets" ,
189+         "fakedata" ,
190+         "draw_boxes_different_label_background_colors.png" ,
188191    )
189192    expected  =  torch .as_tensor (np .array (Image .open (path ))).permute (2 , 0 , 1 )
190193    assert_equal (result , expected )
0 commit comments