MCPcopy Create free account
hub / github.com/python-pillow/Pillow / test_negative_stride

Method test_negative_stride

Tests/test_imagefile.py:153–159  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

151 parser.feed(1) # type: ignore[arg-type]
152
153 def test_negative_stride(self) -> None:
154 with open("Tests/images/raw_negative_stride.bin", "rb") as f:
155 input = f.read()
156 p = ImageFile.Parser()
157 p.feed(input)
158 with pytest.raises(OSError):
159 p.close()
160
161 def test_negative_offset(self) -> None:
162 with Image.open("Tests/images/raw_negative_stride.bin") as im:

Callers

nothing calls this directly

Calls 4

feedMethod · 0.95
closeMethod · 0.95
openFunction · 0.50
readMethod · 0.45

Tested by

no test coverage detected