From 8c2a7502a459bbffe6246339e44b7a401d18b073 Mon Sep 17 00:00:00 2001 From: wiredfool Date: Wed, 28 Jan 2015 10:02:04 -0800 Subject: [PATCH] Correct the name --- PIL/Image.py | 2 +- Tests/test_file_png.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/PIL/Image.py b/PIL/Image.py index 7c17a1682..f6aeb7c3c 100644 --- a/PIL/Image.py +++ b/PIL/Image.py @@ -598,7 +598,7 @@ class Image: id(self) ) - def _repr_png(self): + def _repr_png_(self): """ iPython display hook support :returns: png version of the image as bytes diff --git a/Tests/test_file_png.py b/Tests/test_file_png.py index da5f73a0e..4cd5dc703 100644 --- a/Tests/test_file_png.py +++ b/Tests/test_file_png.py @@ -377,7 +377,7 @@ class TestFilePng(PillowTestCase): def test_repr_png(self): im = hopper() - repr_png = Image.open(BytesIO(im._repr_png())) + repr_png = Image.open(BytesIO(im._repr_png_())) self.assertEqual(repr_png.format, 'PNG') self.assert_image_equal(im, repr_png)