@@ -86,9 +86,9 @@ def test_heif_info_changing(save_format):
86
86
im_out = pillow_heif .open_heif (out_buf )
87
87
for i in range (3 ):
88
88
if i == 1 :
89
- assert im_out [i ].info ["primary" ] and not im_out [i ].info ["exif" ] and not im_out [i ].info [ "xmp" ]
89
+ assert im_out [i ].info ["primary" ] and not im_out [i ].info ["exif" ] and "xmp" not in im_out [i ].info
90
90
else :
91
- assert not im_out [i ].info ["primary" ] and not im_out [i ].info ["exif" ] and not im_out [i ].info [ "xmp" ]
91
+ assert not im_out [i ].info ["primary" ] and not im_out [i ].info ["exif" ] and "xmp" not in im_out [i ].info
92
92
# Set exif and xmp of all images. Change Primary Image to be last.
93
93
for i in range (3 ):
94
94
im [i ].info ["xmp" ] = xmp
@@ -110,7 +110,7 @@ def test_heif_info_changing(save_format):
110
110
assert im_out .info ["primary" ]
111
111
assert im_out .primary_index == 0
112
112
for i in range (3 ):
113
- assert not im_out [i ].info ["exif" ] and not im_out [i ].info [ "xmp" ]
113
+ assert not im_out [i ].info ["exif" ] and "xmp" not in im_out [i ].info
114
114
115
115
116
116
@pytest .mark .skipif (not aom (), reason = "Requires AVIF support." )
@@ -136,9 +136,9 @@ def test_pillow_info_changing(save_format):
136
136
for i in range (3 ):
137
137
im_out .seek (i )
138
138
if i == 1 :
139
- assert im_out .info ["primary" ] and not im_out .info ["exif" ] and not im_out .info [ "xmp" ]
139
+ assert im_out .info ["primary" ] and not im_out .info ["exif" ] and "xmp" not in im_out .info
140
140
else :
141
- assert not im_out .info ["primary" ] and not im_out .info ["exif" ] and not im_out .info [ "xmp" ]
141
+ assert not im_out .info ["primary" ] and not im_out .info ["exif" ] and "xmp" not in im_out .info
142
142
# Set exif and xmp of all images. Change Primary Image to be last.
143
143
for i in range (3 ):
144
144
im .seek (i )
@@ -164,7 +164,7 @@ def test_pillow_info_changing(save_format):
164
164
assert im_out .tell () == 0
165
165
for i in range (3 ):
166
166
im_out .seek (i )
167
- assert not im_out .info ["exif" ] and not im_out .info [ "xmp" ]
167
+ assert not im_out .info ["exif" ] and "xmp" not in im_out .info
168
168
169
169
170
170
@pytest .mark .skipif (not aom (), reason = "Requires AVIF support." )
0 commit comments