Skip to content

Commit fc357ed

Browse files
committed
Test missing frame size
1 parent e946c7b commit fc357ed

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Tests/test_file_fli.py

+10
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import warnings
44

5+
import io
56
import pytest
67

78
from PIL import FliImagePlugin, Image, ImageFile
@@ -132,6 +133,15 @@ def test_eoferror() -> None:
132133
im.seek(n_frames - 1)
133134

134135

136+
def test_missing_frame_size() -> None:
137+
with open(animated_test_file, "rb") as fp:
138+
data = fp.read()
139+
data = data[:6188]
140+
with Image.open(io.BytesIO(data)) as im:
141+
with pytest.raises(EOFError, match="missing frame size"):
142+
im.seek(1)
143+
144+
135145
def test_seek_tell() -> None:
136146
with Image.open(animated_test_file) as im:
137147
layer_number = im.tell()

0 commit comments

Comments
 (0)