From 981ffe752b3d043d3b1eef48bb6b250da99f958c Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Sat, 21 Dec 2019 05:38:39 +0000 Subject: [PATCH] add test for text autofit --- test/test-suite/test_create.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/test-suite/test_create.py b/test/test-suite/test_create.py index 4acdd28b..4bdad052 100644 --- a/test/test-suite/test_create.py +++ b/test/test-suite/test_create.py @@ -392,6 +392,10 @@ class TestCreate: assert im.max() == 255 assert im.min() == 0 + # test autofit + im = pyvips.Image.text("Hello, world!", width=500, height=500) + assert abs(im.width - 500) < 10 + def test_tonelut(self): im = pyvips.Image.tonelut() assert im.bands == 1