skip libtiif webp test when libtiff is too old

This commit is contained in:
nulano 2022-09-05 13:44:12 +02:00
parent 757ee8cf52
commit b22c66eeb8
No known key found for this signature in database
GPG Key ID: B650CDF63B705766

View File

@ -3,6 +3,7 @@ import io
import itertools
import os
import re
import sys
from collections import namedtuple
import pytest
@ -844,6 +845,8 @@ class TestFileLibTiff(LibTiffTestCase):
captured = capfd.readouterr()
if "LZMA compression support is not configured" in captured.err:
pytest.skip("LZMA compression support is not configured")
sys.stdout.write(captured.out)
sys.stderr.write(captured.err)
raise
def test_webp(self, capfd):
@ -857,6 +860,15 @@ class TestFileLibTiff(LibTiffTestCase):
captured = capfd.readouterr()
if "WEBP compression support is not configured" in captured.err:
pytest.skip("WEBP compression support is not configured")
if (
"Compression scheme 50001 strip decoding is not implemented"
in captured.err
):
pytest.skip(
"Compression scheme 50001 strip decoding is not implemented"
)
sys.stdout.write(captured.out)
sys.stderr.write(captured.err)
raise
def test_lzw(self):