test for issue #2614

This commit is contained in:
wiredfool 2017-07-14 03:57:07 -07:00 committed by Andrew Murray
parent 3dd3a90646
commit d2b3e60bbb

View File

@ -393,6 +393,11 @@ class TestImageFont(PillowTestCase):
# Assert
self.assert_image_equal(im, target_img)
def test_getsize_empty(self):
font = self.get_font()
# should not crash.
self.assertEqual((0, 0), font.getsize(''))
def _test_fake_loading_font(self, path_to_fake, fontname):
# Make a copy of FreeTypeFont so we can patch the original
free_type_font = copy.deepcopy(ImageFont.FreeTypeFont)