Correct the name

This commit is contained in:
wiredfool 2015-01-28 10:02:04 -08:00
parent 05fe86654c
commit 8c2a7502a4
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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)