File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -222,18 +222,18 @@ def test_p_la():
222222 assert_image_similar (alpha , comparable , 5 )
223223
224224
225- def test_p_pa ():
225+ def test_p2pa_alpha ():
226226 with Image .open ("Tests/images/tiny.png" ) as im :
227227 assert im .mode == "P"
228228
229229 im_pa = im .convert ("PA" )
230- assert im_pa .mode == "PA"
230+ assert im_pa .mode == "PA"
231231
232- assert (
233- im_pa . tobytes () == b" \x00 \x00 \x00 \x00 \x08 \xff \x04 \xff \x00 \x00 \x00 \x00 "
234- b" \x06 \xff \x07 \xff \x00 \x00 \x00 \x00 \x02 \xff \x03 \xff \x00 "
235- b" \x00 \x00 \x00 \x01 \xff \x05 \xff "
236- )
232+ im_a = im_pa . getchannel ( "A" )
233+ for x in range ( 4 ):
234+ alpha = 255 if x > 1 else 0
235+ for y in range ( 4 ):
236+ assert im_a . getpixel (( x , y )) == alpha
237237
238238
239239def test_matrix_illegal_conversion ():
You can’t perform that action at this time.
0 commit comments