File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -449,12 +449,14 @@ def make_image_file(
449
449
"""
450
450
image_buffer = io .BytesIO ()
451
451
image = Image .new (color_space , (width , height ))
452
- if color_space != 'L' :
453
- reds = random .choices (population = range (0 , 255 ), k = width * height )
454
- greens = random .choices (population = range (0 , 255 ), k = width * height )
455
- blues = random .choices (population = range (0 , 255 ), k = width * height )
456
- pixels = list (zip (reds , greens , blues ))
457
- image .putdata (pixels )
452
+ # If this assertion ever fails, see
453
+ # https://github.com/adamtheturtle/vws-test-fixtures for what to do.
454
+ assert color_space != 'L'
455
+ reds = random .choices (population = range (0 , 255 ), k = width * height )
456
+ greens = random .choices (population = range (0 , 255 ), k = width * height )
457
+ blues = random .choices (population = range (0 , 255 ), k = width * height )
458
+ pixels = list (zip (reds , greens , blues ))
459
+ image .putdata (pixels )
458
460
image .save (image_buffer , file_format )
459
461
image_buffer .seek (0 )
460
462
return image_buffer
You can’t perform that action at this time.
0 commit comments