Show More
@@ -27,7 +27,7 b' class TestCoalesceStreams(TestsBase):' | |||||
27 | """Contains test functions for coalescestreams.py""" |
|
27 | """Contains test functions for coalescestreams.py""" | |
28 |
|
28 | |||
29 |
|
29 | |||
30 |
def build_ |
|
30 | def build_notebook(self): | |
31 | outputs = [nbformat.new_output(output_type="stream", stream="stdout", output_text="a"), |
|
31 | outputs = [nbformat.new_output(output_type="stream", stream="stdout", output_text="a"), | |
32 | nbformat.new_output(output_type="text", output_text="b"), |
|
32 | nbformat.new_output(output_type="text", output_text="b"), | |
33 | nbformat.new_output(output_type="stream", stream="stdout", output_text="c"), |
|
33 | nbformat.new_output(output_type="stream", stream="stdout", output_text="c"), | |
@@ -40,7 +40,7 b' class TestCoalesceStreams(TestsBase):' | |||||
40 | return nbformat.new_notebook(name="notebook1", worksheets=worksheets) |
|
40 | return nbformat.new_notebook(name="notebook1", worksheets=worksheets) | |
41 |
|
41 | |||
42 | def test_coalesce_streams(self): |
|
42 | def test_coalesce_streams(self): | |
43 |
nb, res = coalesce_streams(self.build_ |
|
43 | nb, res = coalesce_streams(self.build_notebook(), {}) | |
44 | self.assertEqual(nb.worksheets[0].cells[0].outputs[0].text, "a") |
|
44 | self.assertEqual(nb.worksheets[0].cells[0].outputs[0].text, "a") | |
45 | self.assertEqual(nb.worksheets[0].cells[0].outputs[1].output_type, "text") |
|
45 | self.assertEqual(nb.worksheets[0].cells[0].outputs[1].output_type, "text") | |
46 | self.assertEqual(nb.worksheets[0].cells[0].outputs[2].text, "cd") |
|
46 | self.assertEqual(nb.worksheets[0].cells[0].outputs[2].text, "cd") |
General Comments 0
You need to be logged in to leave comments.
Login now