diff --git a/IPython/html/nbconvert/tests/test_nbconvert_handlers.py b/IPython/html/nbconvert/tests/test_nbconvert_handlers.py index 657c6d945..16e44fe12 100644 --- a/IPython/html/nbconvert/tests/test_nbconvert_handlers.py +++ b/IPython/html/nbconvert/tests/test_nbconvert_handlers.py @@ -1,4 +1,5 @@ # coding: utf-8 +import base64 import io import json import os @@ -37,6 +38,10 @@ class NbconvertAPI(object): def list_formats(self): return self._req('GET', '') +png_green_pixel = base64.encodestring(b'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00' +b'\x00\x00\x01\x00\x00x00\x01\x08\x02\x00\x00\x00\x90wS\xde\x00\x00\x00\x0cIDAT' +b'\x08\xd7c\x90\xfb\xcf\x00\x00\x02\\\x01\x1e.~d\x87\x00\x00\x00\x00IEND\xaeB`\x82') + class APITest(NotebookTestBase): def setUp(self): nbdir = self.notebook_dir.name @@ -51,6 +56,7 @@ class APITest(NotebookTestBase): ws.cells.append(new_heading_cell(u'Created by test ³')) cc1 = new_code_cell(input=u'print(2*6)') cc1.outputs.append(new_output(output_text=u'12')) + cc1.outputs.append(new_output(output_png=png_green_pixel, output_type='pyout')) ws.cells.append(cc1) with io.open(pjoin(nbdir, 'foo', 'testnb.ipynb'), 'w',