##// END OF EJS Templates
renamed transformer to preprocessors
renamed transformer to preprocessors

File last commit:

r12221:017ada76
r12221:017ada76
Show More
test_coalescestreams.py
38 lines | 1.4 KiB | text/x-python | PythonLexer
Jonathan Frederic
Add coalesce streams test
r12021 """
Paul Ivanov
replace 'transformer' with 'preprocessor'
r12219 Module with tests for the coalescestreams preprocessor
Jonathan Frederic
Add coalesce streams test
r12021 """
#-----------------------------------------------------------------------------
# Copyright (c) 2013, the IPython Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
# Imports
#-----------------------------------------------------------------------------
Paul Ivanov
replace 'transformer' with 'preprocessor'
r12219 from .base import PreprocessorTestsBase
Jonathan Frederic
Add coalesce streams test
r12021 from ..coalescestreams import coalesce_streams
#-----------------------------------------------------------------------------
# Class
#-----------------------------------------------------------------------------
Paul Ivanov
replace 'transformer' with 'preprocessor'
r12219 class TestCoalesceStreams(PreprocessorTestsBase):
Jonathan Frederic
Add coalesce streams test
r12021 """Contains test functions for coalescestreams.py"""
def test_coalesce_streams(self):
Paul Ivanov
replace 'transformer' with 'preprocessor'
r12219 """coalesce_streams preprocessor output test"""
Jonathan Frederic
Expanded transformer pass line, for easier debugging
r12039 nb = self.build_notebook()
res = self.build_resources()
nb, res = coalesce_streams(nb, res)
Jonathan Frederic
Fixes small things pointed out by @minrk
r12035 outputs = nb.worksheets[0].cells[0].outputs
self.assertEqual(outputs[0].text, "a")
self.assertEqual(outputs[1].output_type, "text")
self.assertEqual(outputs[2].text, "cd")
self.assertEqual(outputs[3].text, "ef")
Paul Ivanov
replace 'transformer' with 'preprocessor'
r12219