From 4b4f7d6a2c14e4b0ab68d506384ac4b677f1c6b2 Mon Sep 17 00:00:00 2001 From: Eric Soroos Date: Wed, 20 Dec 2017 12:21:33 +0000 Subject: [PATCH] Refactor to use features --- Tests/test_file_libtiff.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Tests/test_file_libtiff.py b/Tests/test_file_libtiff.py index 94336021f..c165ff08a 100644 --- a/Tests/test_file_libtiff.py +++ b/Tests/test_file_libtiff.py @@ -1,5 +1,6 @@ from __future__ import print_function from helper import unittest, PillowTestCase, hopper, py3 +from PIL import features from ctypes import c_float import io @@ -15,9 +16,7 @@ logger = logging.getLogger(__name__) class LibTiffTestCase(PillowTestCase): def setUp(self): - codecs = dir(Image.core) - - if "libtiff_encoder" not in codecs or "libtiff_decoder" not in codecs: + if not features.check('libtiff'): self.skipTest("tiff support not available") def _assert_noerr(self, im):