##// END OF EJS Templates
Use default OS shell to run system commands...
Use default OS shell to run system commands Instead of using os.system which uses /bin/sh, this uses subprocess.call (the replacement of os.system) to run the command using the default shell of the OS. With this, one can use more advanced commands for bash, zsh, ksh, ... I do not have a win32 system to test this modification, so maybe line 2236 can also be changed like 2239.

File last commit:

r12040:a2755857
r12217:56bf2f98
Show More
test_coalescestreams.py
37 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
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")
Jonathan Frederic
Add coalesce streams test
r12021