From 42588a649330b577bad686e20596c50b9fe4ad03 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Sun, 30 Jun 2019 13:25:12 +1000 Subject: [PATCH] Skip test if libtiff is not installed --- Tests/test_file_tiff.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Tests/test_file_tiff.py b/Tests/test_file_tiff.py index e241f6a6ad2..3b0afba6777 100644 --- a/Tests/test_file_tiff.py +++ b/Tests/test_file_tiff.py @@ -4,7 +4,7 @@ from .helper import unittest, PillowTestCase, hopper -from PIL import Image, TiffImagePlugin +from PIL import Image, TiffImagePlugin, features from PIL._util import py3 from PIL.TiffImagePlugin import X_RESOLUTION, Y_RESOLUTION, RESOLUTION_UNIT @@ -587,6 +587,7 @@ def test_close_on_load_nonexclusive(self): im.load() self.assertFalse(fp.closed) + @unittest.skipUnless(features.check("libtiff"), "libtiff not installed") def test_sampleformat_not_corrupted(self): # Assert that a TIFF image with SampleFormat=UINT tag is not corrupted # when saving to a new file.