test libtiff with lzma

This commit is contained in:
nulano 2022-09-05 10:13:52 +02:00
parent 41a7bfe1c1
commit 9699a0e1d6
No known key found for this signature in database
GPG Key ID: B650CDF63B705766
2 changed files with 14 additions and 0 deletions

Binary file not shown.

View File

@ -832,6 +832,20 @@ class TestFileLibTiff(LibTiffTestCase):
assert reloaded.mode == "F"
assert reloaded.getexif()[SAMPLEFORMAT] == 3
def test_lzma(self, capfd):
try:
with Image.open("Tests/images/hopper_lzma.tif") as im:
assert im.mode == "RGB"
assert im.size == (128, 128)
assert im.format == "TIFF"
im2 = hopper()
assert_image_similar(im, im2, 5)
except OSError:
captured = capfd.readouterr()
if "LZMA compression support is not configured" in captured.err:
pytest.skip("LZMA compression support is not configured")
raise
def test_lzw(self):
with Image.open("Tests/images/hopper_lzw.tif") as im:
assert im.mode == "RGB"