mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-28 02:04:36 +03:00
Correct the name
This commit is contained in:
parent
05fe86654c
commit
8c2a7502a4
|
@ -598,7 +598,7 @@ class Image:
|
||||||
id(self)
|
id(self)
|
||||||
)
|
)
|
||||||
|
|
||||||
def _repr_png(self):
|
def _repr_png_(self):
|
||||||
""" iPython display hook support
|
""" iPython display hook support
|
||||||
|
|
||||||
:returns: png version of the image as bytes
|
:returns: png version of the image as bytes
|
||||||
|
|
|
@ -377,7 +377,7 @@ class TestFilePng(PillowTestCase):
|
||||||
def test_repr_png(self):
|
def test_repr_png(self):
|
||||||
im = hopper()
|
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.assertEqual(repr_png.format, 'PNG')
|
||||||
self.assert_image_equal(im, repr_png)
|
self.assert_image_equal(im, repr_png)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user