From d132c25e5d49fc2b1107e11c4ec6feb38c184c78 Mon Sep 17 00:00:00 2001 From: Micah Chambers Date: Fri, 20 May 2016 02:01:05 +0000 Subject: [PATCH] added test --- Tests/test_imagefont.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Tests/test_imagefont.py b/Tests/test_imagefont.py index cc142d459..552f4371c 100644 --- a/Tests/test_imagefont.py +++ b/Tests/test_imagefont.py @@ -52,6 +52,9 @@ try: ttf = ImageFont.truetype(FONT_PATH, FONT_SIZE) self.assertEqual(ttf.path, FONT_PATH) self.assertEqual(ttf.size, FONT_SIZE) + self.assertTrue(ttf.hasglyph('a') + self.assertFalse(ttf.hasglyph('\ueeee') + self.assertEqual(ttf.getglyphs(), '....') ttf_copy = ttf.font_variant() self.assertEqual(ttf_copy.path, FONT_PATH) @@ -63,6 +66,9 @@ try: second_font_path = "Tests/fonts/DejaVuSans.ttf" ttf_copy = ttf.font_variant(font=second_font_path) self.assertEqual(ttf_copy.path, second_font_path) + self.assertTrue(ttf_copy.hasglyph('a') + self.assertFalse(ttf_copy.hasglyph('\ueeee') + self.assertEqual(ttf_copy.getglyphs(), '....') def test_font_with_name(self): ImageFont.truetype(FONT_PATH, FONT_SIZE)