Show More
@@ -5,6 +5,7 b'' | |||||
5 |
|
5 | |||
6 | from .base import ExportersTestsBase |
|
6 | from .base import ExportersTestsBase | |
7 | from ..html import HTMLExporter |
|
7 | from ..html import HTMLExporter | |
|
8 | from IPython.nbformat import v4 | |||
8 | import re |
|
9 | import re | |
9 |
|
10 | |||
10 |
|
11 | |||
@@ -66,3 +67,19 b' class TestHTMLExporter(ExportersTestsBase):' | |||||
66 | (output, resources) = HTMLExporter(template_file='basic').from_filename( |
|
67 | (output, resources) = HTMLExporter(template_file='basic').from_filename( | |
67 | self._get_notebook(nb_name="pngmetadata.ipynb")) |
|
68 | self._get_notebook(nb_name="pngmetadata.ipynb")) | |
68 | assert len(output) > 0 |
|
69 | assert len(output) > 0 | |
|
70 | ||||
|
71 | def test_javascript_output(self): | |||
|
72 | nb = v4.new_notebook( | |||
|
73 | cells=[ | |||
|
74 | v4.new_code_cell( | |||
|
75 | outputs=[v4.new_output( | |||
|
76 | output_type='display_data', | |||
|
77 | data={ | |||
|
78 | 'application/javascript': "javascript_output();" | |||
|
79 | } | |||
|
80 | )] | |||
|
81 | ) | |||
|
82 | ] | |||
|
83 | ) | |||
|
84 | (output, resources) = HTMLExporter(template_file='basic').from_notebook_node(nb) | |||
|
85 | self.assertIn('javascript_output', output) |
General Comments 0
You need to be logged in to leave comments.
Login now