##// END OF EJS Templates
Added one more test, multiple \r on one line
Jonathan Frederic -
Show More
@@ -61,7 +61,8 b' class TestCoalesceStreams(PreprocessorTestsBase):'
61 nbformat.new_output(output_type="stream", stream="stdout", output_text="\ra"),
61 nbformat.new_output(output_type="stream", stream="stdout", output_text="\ra"),
62 nbformat.new_output(output_type="stream", stream="stdout", output_text="\nz\rb"),
62 nbformat.new_output(output_type="stream", stream="stdout", output_text="\nz\rb"),
63 nbformat.new_output(output_type="stream", stream="stdout", output_text="\nz"),
63 nbformat.new_output(output_type="stream", stream="stdout", output_text="\nz"),
64 nbformat.new_output(output_type="stream", stream="stdout", output_text="\rc")]
64 nbformat.new_output(output_type="stream", stream="stdout", output_text="\rc\n"),
65 nbformat.new_output(output_type="stream", stream="stdout", output_text="z\rz\rd")]
65 cells=[nbformat.new_code_cell(input="# None", prompt_number=1,outputs=outputs)]
66 cells=[nbformat.new_code_cell(input="# None", prompt_number=1,outputs=outputs)]
66 worksheets = [nbformat.new_worksheet(name="worksheet1", cells=cells)]
67 worksheets = [nbformat.new_worksheet(name="worksheet1", cells=cells)]
67
68
@@ -69,4 +70,4 b' class TestCoalesceStreams(PreprocessorTestsBase):'
69 res = self.build_resources()
70 res = self.build_resources()
70 nb, res = coalesce_streams(nb, res)
71 nb, res = coalesce_streams(nb, res)
71 outputs = nb.worksheets[0].cells[0].outputs
72 outputs = nb.worksheets[0].cells[0].outputs
72 self.assertEqual(outputs[0].text, u'a\nb\nc')
73 self.assertEqual(outputs[0].text, u'a\nb\nc\nd')
General Comments 0
You need to be logged in to leave comments. Login now