mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 01:46:18 +03:00
test libtiff with lzma
This commit is contained in:
parent
41a7bfe1c1
commit
9699a0e1d6
BIN
Tests/images/hopper_lzma.tif
Normal file
BIN
Tests/images/hopper_lzma.tif
Normal file
Binary file not shown.
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue
Block a user