Show More
@@ -27,7 +27,10 b' class TestCoalesceStreams(TransformerTestsBase):' | |||
|
27 | 27 | |
|
28 | 28 | def test_coalesce_streams(self): |
|
29 | 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 | 34 | outputs = nb.worksheets[0].cells[0].outputs |
|
32 | 35 | self.assertEqual(outputs[0].text, "a") |
|
33 | 36 | self.assertEqual(outputs[1].output_type, "text") |
@@ -40,6 +40,9 b' class TestCSSHTMLHeader(TransformerTestsBase):' | |||
|
40 | 40 | |
|
41 | 41 | def test_output(self): |
|
42 | 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 | 47 | assert 'inlining' in res |
|
45 | 48 | assert 'css' in res['inlining'] No newline at end of file |
@@ -40,7 +40,10 b' class TestExtractOutput(TransformerTestsBase):' | |||
|
40 | 40 | |
|
41 | 41 | def test_output(self): |
|
42 | 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 | 48 | # Check if text was extracted. |
|
46 | 49 | assert 'text_filename' in nb.worksheets[0].cells[0].outputs[1] |
@@ -39,7 +39,10 b' class TestLatex(TransformerTestsBase):' | |||
|
39 | 39 | |
|
40 | 40 | def test_output(self): |
|
41 | 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 | 47 | # Make sure the code cell wasn't modified. |
|
45 | 48 | self.assertEqual(nb.worksheets[0].cells[0].input, '$ e $') |
@@ -60,14 +60,20 b' class Testrevealhelp(TransformerTestsBase):' | |||
|
60 | 60 | |
|
61 | 61 | def test_reveal_attribute(self): |
|
62 | 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 | 67 | assert 'reveal' in res |
|
65 | 68 | assert 'url_prefix' in res['reveal'] |
|
66 | 69 | |
|
67 | 70 | |
|
68 | 71 | def test_reveal_output(self): |
|
69 | 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 | 77 | cells = nb.worksheets[0].cells |
|
72 | 78 | |
|
73 | 79 | # Make sure correct metadata tags are available on every cell. |
@@ -41,7 +41,10 b' class TestSphinx(TransformerTestsBase):' | |||
|
41 | 41 | def test_resources(self): |
|
42 | 42 | """Make sure the SphinxTransformer adds the appropriate resources to the |
|
43 | 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 | 48 | assert 'sphinx' in res |
|
46 | 49 | assert "author" in res['sphinx'] |
|
47 | 50 | assert "version" in res['sphinx'] |
@@ -78,10 +78,13 b' class Testsvg2pdf(TransformerTestsBase):' | |||
|
78 | 78 | def test_constructor(self): |
|
79 | 79 | """Can a SVG2PDFTransformer be constructed?""" |
|
80 | 80 | self.build_transformer() |
|
81 | ||
|
81 | ||
|
82 | 82 | |
|
83 | 83 | @dec.onlyif_cmds_exist('inkscape') |
|
84 | 84 | def test_output(self): |
|
85 | 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 | 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