Skip libimagequant's test if it's unavailable

This commit is contained in:
rr- 2016-05-06 21:06:58 +02:00
parent 8b7fb44c6b
commit c5278000c5
2 changed files with 8 additions and 2 deletions

View File

@ -18,7 +18,13 @@ class TestImageQuantize(PillowTestCase):
def test_libimagequant_quantize(self):
im = hopper()
im = im.quantize(100, Image.LIBIMAGEQUANT)
try:
im = im.quantize(100, Image.LIBIMAGEQUANT)
except ValueError as ex:
if 'dependency' in str(ex).lower():
self.skipTest('libimagepng support not available')
else:
raise
self.assert_image(im, "P", im.size)
assert len(im.getcolors()) == 100

View File

@ -15,4 +15,4 @@ For more extensive info, see the windows build instructions `docs/build.rst`.
* `python test.py` runs the tests on Pillow in all the virtual envs.
* Currently working with zlib, libjpeg, freetype, and libtiff on Python 2.7, 3.3, and 3.4, both 32 and 64 bit, on a local win7 pro machine and appveyor.com
* Webp is built, not detected.
* LCMS and OpenJpeg are not building.
* LCMS, OpenJpeg and libimagequant are not building.