diff --git a/IPython/nbconvert/tests/test_nbconvertapp.py b/IPython/nbconvert/tests/test_nbconvertapp.py index 1eabe13..2df3948 100644 --- a/IPython/nbconvert/tests/test_nbconvertapp.py +++ b/IPython/nbconvert/tests/test_nbconvertapp.py @@ -15,10 +15,12 @@ Contains tests for the nbconvertapp import os import glob +import sys from .base import TestsBase from IPython.testing import decorators as dec +from IPython.external.decorators import knownfailureif #----------------------------------------------------------------------------- @@ -104,6 +106,18 @@ class TestNbConvertApp(TestsBase): @dec.onlyif_cmds_exist('pandoc') + @knownfailureif(sys.version_info[0] >= 3, "nbconvert html conversion fails for .png images on Python3 ") + def test_png_base64_html_ok(self): + """Is embedded png data well formed in HTML?""" + with self.create_temp_cwd(['notebook2.ipynb']): + self.call('nbconvert --log-level 0 --to HTML ' + 'notebook2.ipynb --template full') + assert os.path.isfile('notebook2.html') + with open('notebook2.html') as f: + assert "data:image/png;base64,b'" not in f.read() + + + @dec.onlyif_cmds_exist('pandoc') def test_template(self): """ Do export templates work?