##// END OF EJS Templates
update test_extract_output
MinRK -
Show More
@@ -36,7 +36,7 b' class PreprocessorTestsBase(TestsBase):'
36 nbformat.new_output(output_type="stream", stream="stdout", output_text="d"),
36 nbformat.new_output(output_type="stream", stream="stdout", output_text="d"),
37 nbformat.new_output(output_type="stream", stream="stderr", output_text="e"),
37 nbformat.new_output(output_type="stream", stream="stderr", output_text="e"),
38 nbformat.new_output(output_type="stream", stream="stderr", output_text="f"),
38 nbformat.new_output(output_type="stream", stream="stderr", output_text="f"),
39 nbformat.new_output(output_type="png", output_png=b'Zw==')] #g
39 nbformat.new_output(output_type="png", output_png='Zw==')] #g
40
40
41 cells=[nbformat.new_code_cell(input="$ e $", prompt_number=1,outputs=outputs),
41 cells=[nbformat.new_code_cell(input="$ e $", prompt_number=1,outputs=outputs),
42 nbformat.new_text_cell('markdown', source="$ e $")]
42 nbformat.new_text_cell('markdown', source="$ e $")]
@@ -46,12 +46,14 b' class TestExtractOutput(PreprocessorTestsBase):'
46 nb, res = preprocessor(nb, res)
46 nb, res = preprocessor(nb, res)
47
47
48 # Check if text was extracted.
48 # Check if text was extracted.
49 assert 'text_filename' in nb.worksheets[0].cells[0].outputs[1]
49 output = nb.worksheets[0].cells[0].outputs[1]
50 text_filename = nb.worksheets[0].cells[0].outputs[1]['text_filename']
50 assert 'text_filename' in output
51 text_filename = output['text_filename']
51
52
52 # Check if png was extracted.
53 # Check if png was extracted.
53 assert 'png_filename' in nb.worksheets[0].cells[0].outputs[6]
54 output = nb.worksheets[0].cells[0].outputs[6]
54 png_filename = nb.worksheets[0].cells[0].outputs[6]['png_filename']
55 assert 'png_filename' in output
56 png_filename = output['png_filename']
55
57
56 # Verify text output
58 # Verify text output
57 assert text_filename in res['outputs']
59 assert text_filename in res['outputs']
General Comments 0
You need to be logged in to leave comments. Login now