From 5309c8e21eab3db40424b37459cda511cd559b9e Mon Sep 17 00:00:00 2001 From: homm Date: Tue, 8 Sep 2015 18:00:00 +0300 Subject: [PATCH] Skip ImageFont_bitmap test if _imagingft C module is not installed --- Tests/test_imagefont_bitmap.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Tests/test_imagefont_bitmap.py b/Tests/test_imagefont_bitmap.py index a9d745b22..51da499b8 100644 --- a/Tests/test_imagefont_bitmap.py +++ b/Tests/test_imagefont_bitmap.py @@ -2,6 +2,14 @@ from helper import unittest, PillowTestCase from PIL import Image, ImageFont, ImageDraw +image_font_installed = True +try: + ImageFont.core.getfont +except ImportError: + image_font_installed = False + + +@unittest.skipIf(not image_font_installed, "image font not installed") class TestImageFontBitmap(PillowTestCase): def test_similar(self): text = 'EmbeddedBitmap'