Refactor to use features

This commit is contained in:
Eric Soroos 2017-12-20 12:21:33 +00:00
parent d698d522ef
commit 4b4f7d6a2c

View File

@ -1,5 +1,6 @@
from __future__ import print_function from __future__ import print_function
from helper import unittest, PillowTestCase, hopper, py3 from helper import unittest, PillowTestCase, hopper, py3
from PIL import features
from ctypes import c_float from ctypes import c_float
import io import io
@ -15,9 +16,7 @@ logger = logging.getLogger(__name__)
class LibTiffTestCase(PillowTestCase): class LibTiffTestCase(PillowTestCase):
def setUp(self): def setUp(self):
codecs = dir(Image.core) if not features.check('libtiff'):
if "libtiff_encoder" not in codecs or "libtiff_decoder" not in codecs:
self.skipTest("tiff support not available") self.skipTest("tiff support not available")
def _assert_noerr(self, im): def _assert_noerr(self, im):