mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-05-01 22:43:41 +03:00
Test missing frame size
This commit is contained in:
parent
e946c7b14a
commit
5575c1d072
|
@ -1,5 +1,6 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import io
|
||||
import warnings
|
||||
|
||||
import pytest
|
||||
|
@ -132,6 +133,15 @@ def test_eoferror() -> None:
|
|||
im.seek(n_frames - 1)
|
||||
|
||||
|
||||
def test_missing_frame_size() -> None:
|
||||
with open(animated_test_file, "rb") as fp:
|
||||
data = fp.read()
|
||||
data = data[:6188]
|
||||
with Image.open(io.BytesIO(data)) as im:
|
||||
with pytest.raises(EOFError, match="missing frame size"):
|
||||
im.seek(1)
|
||||
|
||||
|
||||
def test_seek_tell() -> None:
|
||||
with Image.open(animated_test_file) as im:
|
||||
layer_number = im.tell()
|
||||
|
|
Loading…
Reference in New Issue
Block a user