From 3fda581963ffaa588e854ba0343f5864a4dc8b66 Mon Sep 17 00:00:00 2001 From: tianyu Date: Tue, 24 Apr 2018 22:27:29 +0800 Subject: [PATCH] Added test for getsize_multiline --- Tests/test_imagefont.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Tests/test_imagefont.py b/Tests/test_imagefont.py index 986b0b5ef..aae7fa8cc 100644 --- a/Tests/test_imagefont.py +++ b/Tests/test_imagefont.py @@ -509,6 +509,12 @@ class TestImageFont(PillowTestCase): self.assertEqual(t.getsize('M'), self.metrics['getters']) self.assertEqual(t.getsize('y'), (12, 20)) self.assertEqual(t.getsize('a'), (12, 16)) + self.assertEqual(t.getsize_multiline('A'),(12,16)) + self.assertEqual(t.getsize_multiline('AB'),(24,16)) + self.assertEqual(t.getsize_multiline('a'),(12,16)) + self.assertEqual(t.getsize_multiline('ABC\n'),(36,36)) + self.assertEqual(t.getsize_multiline('ABC\nA'),(36,36)) + self.assertEqual(t.getsize_multiline('ABC\nAaaa'),(48,36)) @unittest.skipUnless(HAS_RAQM, "Raqm not Available")