mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-07-05 04:13:11 +03:00
Assert _getmp() does not return None
This commit is contained in:
parent
0d1edba311
commit
33460d2f82
|
@ -156,6 +156,7 @@ def test_reload_exif_after_seek() -> None:
|
|||
def test_mp(test_file: str) -> None:
|
||||
with Image.open(test_file) as im:
|
||||
mpinfo = im._getmp()
|
||||
assert mpinfo is not None
|
||||
assert mpinfo[45056] == b"0100"
|
||||
assert mpinfo[45057] == 2
|
||||
|
||||
|
@ -165,6 +166,7 @@ def test_mp_offset() -> None:
|
|||
# in APP2 data, in contrast to normal 8
|
||||
with Image.open("Tests/images/sugarshack_ifd_offset.mpo") as im:
|
||||
mpinfo = im._getmp()
|
||||
assert mpinfo is not None
|
||||
assert mpinfo[45056] == b"0100"
|
||||
assert mpinfo[45057] == 2
|
||||
|
||||
|
@ -181,6 +183,7 @@ def test_mp_no_data() -> None:
|
|||
def test_mp_attribute(test_file: str) -> None:
|
||||
with Image.open(test_file) as im:
|
||||
mpinfo = im._getmp()
|
||||
assert mpinfo is not None
|
||||
for frame_number, mpentry in enumerate(mpinfo[0xB002]):
|
||||
mpattr = mpentry["Attribute"]
|
||||
if frame_number:
|
||||
|
|
Loading…
Reference in New Issue
Block a user