Added test

This commit is contained in:
Andrew Murray 2021-07-07 19:16:44 +10:00 committed by Hugo van Kemenade
parent 39e36368e7
commit 8cc3ac3093

View File

@ -968,10 +968,11 @@ class TestFileLibTiff(LibTiffTestCase):
assert str(e.value) == "-9"
TiffImagePlugin.READ_LIBTIFF = False
def test_save_multistrip(self, tmp_path):
@pytest.mark.parametrize("compression", ("tiff_adobe_deflate", "jpeg"))
def test_save_multistrip(self, compression, tmp_path):
im = hopper("RGB").resize((256, 256))
out = str(tmp_path / "temp.tif")
im.save(out, compression="tiff_adobe_deflate")
im.save(out, compression=compression)
with Image.open(out) as im:
# Assert that there are multiple strips