From ddb0a6393f3fcb4aeb78f0567a58d9058ba9ca72 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Tue, 18 Jan 2022 11:46:29 +1100 Subject: [PATCH] Added test --- Tests/test_image.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Tests/test_image.py b/Tests/test_image.py index cf60f42af..db3e3063e 100644 --- a/Tests/test_image.py +++ b/Tests/test_image.py @@ -88,6 +88,17 @@ class TestImage: # with pytest.raises(MemoryError): # Image.new("L", (1000000, 1000000)) + def test_repr_pretty(self): + class Pretty: + def text(self, text): + self.pretty_output = text + + im = Image.new("L", (100, 100)) + + p = Pretty() + im._repr_pretty_(p, None) + assert p.pretty_output == "" + def test_open_formats(self): PNGFILE = "Tests/images/hopper.png" JPGFILE = "Tests/images/hopper.jpg"