(self)
| 105 | |
| 106 | @skip_unless_feature("webp") |
| 107 | def test_incremental_webp(self) -> None: |
| 108 | with ImageFile.Parser() as p: |
| 109 | with open("Tests/images/hopper.webp", "rb") as f: |
| 110 | p.feed(f.read(1024)) |
| 111 | |
| 112 | # Check that insufficient data was given in the first feed |
| 113 | assert not p.image |
| 114 | |
| 115 | p.feed(f.read()) |
| 116 | assert p.image is not None |
| 117 | assert (128, 128) == p.image.size |
| 118 | |
| 119 | @skip_unless_feature("zlib") |
| 120 | def test_safeblock(self, monkeypatch: pytest.MonkeyPatch) -> None: |