Skip ImageFont_bitmap test if _imagingft C module is not installed

This commit is contained in:
homm 2015-09-08 18:00:00 +03:00
parent 8c3f66a9ae
commit 5309c8e21e

View File

@ -2,6 +2,14 @@ from helper import unittest, PillowTestCase
from PIL import Image, ImageFont, ImageDraw 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): class TestImageFontBitmap(PillowTestCase):
def test_similar(self): def test_similar(self):
text = 'EmbeddedBitmap' text = 'EmbeddedBitmap'