(self)
| 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: |