##// END OF EJS Templates
Added sphinx transformer tests
Added sphinx transformer tests

File last commit:

r12031:5201e89d
r12033:b011672e
Show More
test_coalescestreams.py
34 lines | 1.4 KiB | text/x-python | PythonLexer
Jonathan Frederic
Add coalesce streams test
r12021 """
Module with tests for the coalescestreams transformer
"""
#-----------------------------------------------------------------------------
# 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
#-----------------------------------------------------------------------------
Jonathan Frederic
Added base transformers test class and added CSSHTMLHeaderTransformer tests
r12023 from .base import TransformerTestsBase
Jonathan Frederic
Add coalesce streams test
r12021 from ..coalescestreams import coalesce_streams
#-----------------------------------------------------------------------------
# Class
#-----------------------------------------------------------------------------
Jonathan Frederic
Added base transformers test class and added CSSHTMLHeaderTransformer tests
r12023 class TestCoalesceStreams(TransformerTestsBase):
Jonathan Frederic
Add coalesce streams test
r12021 """Contains test functions for coalescestreams.py"""
def test_coalesce_streams(self):
Jonathan Frederic
Added base transformers test class and added CSSHTMLHeaderTransformer tests
r12023 """coalesce_streams transformer output test"""
Jonathan Frederic
Added utility function to build a proper resources dict
r12031 nb, res = coalesce_streams(self.build_notebook(), self.build_resources())
Jonathan Frederic
Add coalesce streams test
r12021 self.assertEqual(nb.worksheets[0].cells[0].outputs[0].text, "a")
self.assertEqual(nb.worksheets[0].cells[0].outputs[1].output_type, "text")
self.assertEqual(nb.worksheets[0].cells[0].outputs[2].text, "cd")
self.assertEqual(nb.worksheets[0].cells[0].outputs[3].text, "ef")