Show More
@@ -27,7 +27,10 b' class TestCoalesceStreams(TransformerTestsBase):' | |||||
27 |
|
27 | |||
28 | def test_coalesce_streams(self): |
|
28 | def test_coalesce_streams(self): | |
29 | """coalesce_streams transformer output test""" |
|
29 | """coalesce_streams transformer output test""" | |
30 | nb, res = coalesce_streams(self.build_notebook(), self.build_resources()) |
|
30 | nb = self.build_notebook() | |
|
31 | res = self.build_resources() | |||
|
32 | nb, res = transformer(nb, res) | |||
|
33 | nb, res = coalesce_streams(nb, res) | |||
31 | outputs = nb.worksheets[0].cells[0].outputs |
|
34 | outputs = nb.worksheets[0].cells[0].outputs | |
32 | self.assertEqual(outputs[0].text, "a") |
|
35 | self.assertEqual(outputs[0].text, "a") | |
33 | self.assertEqual(outputs[1].output_type, "text") |
|
36 | self.assertEqual(outputs[1].output_type, "text") |
@@ -40,6 +40,9 b' class TestCSSHTMLHeader(TransformerTestsBase):' | |||||
40 |
|
40 | |||
41 | def test_output(self): |
|
41 | def test_output(self): | |
42 | """Test the output of the CSSHTMLHeaderTransformer""" |
|
42 | """Test the output of the CSSHTMLHeaderTransformer""" | |
43 | nb, res = self.build_transformer()(self.build_notebook(), self.build_resources()) |
|
43 | nb = self.build_notebook() | |
|
44 | res = self.build_resources() | |||
|
45 | transformer = self.build_transformer() | |||
|
46 | nb, res = transformer(nb, res) | |||
44 | assert 'inlining' in res |
|
47 | assert 'inlining' in res | |
45 | assert 'css' in res['inlining'] No newline at end of file |
|
48 | assert 'css' in res['inlining'] |
@@ -40,7 +40,10 b' class TestExtractOutput(TransformerTestsBase):' | |||||
40 |
|
40 | |||
41 | def test_output(self): |
|
41 | def test_output(self): | |
42 | """Test the output of the ExtractOutputTransformer""" |
|
42 | """Test the output of the ExtractOutputTransformer""" | |
43 | nb, res = self.build_transformer()(self.build_notebook(), self.build_resources()) |
|
43 | nb = self.build_notebook() | |
|
44 | res = self.build_resources() | |||
|
45 | transformer = self.build_transformer() | |||
|
46 | nb, res = transformer(nb, res) | |||
44 |
|
47 | |||
45 | # Check if text was extracted. |
|
48 | # Check if text was extracted. | |
46 | assert 'text_filename' in nb.worksheets[0].cells[0].outputs[1] |
|
49 | assert 'text_filename' in nb.worksheets[0].cells[0].outputs[1] |
@@ -39,7 +39,10 b' class TestLatex(TransformerTestsBase):' | |||||
39 |
|
39 | |||
40 | def test_output(self): |
|
40 | def test_output(self): | |
41 | """Test the output of the LatexTransformer""" |
|
41 | """Test the output of the LatexTransformer""" | |
42 | nb, res = self.build_transformer()(self.build_notebook(), self.build_resources()) |
|
42 | nb = self.build_notebook() | |
|
43 | res = self.build_resources() | |||
|
44 | transformer = self.build_transformer() | |||
|
45 | nb, res = transformer(nb, res) | |||
43 |
|
46 | |||
44 | # Make sure the code cell wasn't modified. |
|
47 | # Make sure the code cell wasn't modified. | |
45 | self.assertEqual(nb.worksheets[0].cells[0].input, '$ e $') |
|
48 | self.assertEqual(nb.worksheets[0].cells[0].input, '$ e $') |
@@ -60,14 +60,20 b' class Testrevealhelp(TransformerTestsBase):' | |||||
60 |
|
60 | |||
61 | def test_reveal_attribute(self): |
|
61 | def test_reveal_attribute(self): | |
62 | """Make sure the reveal url_prefix resources is set""" |
|
62 | """Make sure the reveal url_prefix resources is set""" | |
63 | nb, res = self.build_transformer()(self.build_notebook(), self.build_resources()) |
|
63 | nb = self.build_notebook() | |
|
64 | res = self.build_resources() | |||
|
65 | transformer = self.build_transformer() | |||
|
66 | nb, res = transformer(nb, res) | |||
64 | assert 'reveal' in res |
|
67 | assert 'reveal' in res | |
65 | assert 'url_prefix' in res['reveal'] |
|
68 | assert 'url_prefix' in res['reveal'] | |
66 |
|
69 | |||
67 |
|
70 | |||
68 | def test_reveal_output(self): |
|
71 | def test_reveal_output(self): | |
69 | """Make sure that the reveal transformer """ |
|
72 | """Make sure that the reveal transformer """ | |
70 | nb, res = self.build_transformer()(self.build_notebook(), self.build_resources()) |
|
73 | nb = self.build_notebook() | |
|
74 | res = self.build_resources() | |||
|
75 | transformer = self.build_transformer() | |||
|
76 | nb, res = transformer(nb, res) | |||
71 | cells = nb.worksheets[0].cells |
|
77 | cells = nb.worksheets[0].cells | |
72 |
|
78 | |||
73 | # Make sure correct metadata tags are available on every cell. |
|
79 | # Make sure correct metadata tags are available on every cell. |
@@ -41,7 +41,10 b' class TestSphinx(TransformerTestsBase):' | |||||
41 | def test_resources(self): |
|
41 | def test_resources(self): | |
42 | """Make sure the SphinxTransformer adds the appropriate resources to the |
|
42 | """Make sure the SphinxTransformer adds the appropriate resources to the | |
43 | resources dict.""" |
|
43 | resources dict.""" | |
44 | nb, res = self.build_transformer()(self.build_notebook(), self.build_resources()) |
|
44 | nb = self.build_notebook() | |
|
45 | res = self.build_resources() | |||
|
46 | transformer = self.build_transformer() | |||
|
47 | nb, res = transformer(nb, res) | |||
45 | assert 'sphinx' in res |
|
48 | assert 'sphinx' in res | |
46 | assert "author" in res['sphinx'] |
|
49 | assert "author" in res['sphinx'] | |
47 | assert "version" in res['sphinx'] |
|
50 | assert "version" in res['sphinx'] |
@@ -83,5 +83,8 b' class Testsvg2pdf(TransformerTestsBase):' | |||||
83 | @dec.onlyif_cmds_exist('inkscape') |
|
83 | @dec.onlyif_cmds_exist('inkscape') | |
84 | def test_output(self): |
|
84 | def test_output(self): | |
85 | """Test the output of the SVG2PDFTransformer""" |
|
85 | """Test the output of the SVG2PDFTransformer""" | |
86 | nb, res = self.build_transformer()(self.build_notebook(), self.build_resources()) |
|
86 | nb = self.build_notebook() | |
|
87 | res = self.build_resources() | |||
|
88 | transformer = self.build_transformer() | |||
|
89 | nb, res = transformer(nb, res) | |||
87 | assert 'svg' in nb.worksheets[0].cells[0].outputs[0] |
|
90 | assert 'svg' in nb.worksheets[0].cells[0].outputs[0] |
General Comments 0
You need to be logged in to leave comments.
Login now