
from metakernel.tests.utils import get_kernel, get_log_text
from metakernel.process_metakernel import BashKernel


def test_process_metakernel():
    kernel = get_kernel(BashKernel)
    kernel.do_execute("cat \"%s\"" % __file__, False)
    log_text = get_log_text(kernel)
    assert 'metakernel.py' in log_text, log_text

    kernel.do_execute('echo "hello"\necho "goodbye"', None)
    log_text = get_log_text(kernel)
    assert '"hello"' in log_text
    assert '"goodbye"' in log_text

    kernel.do_execute('lalkjds')
    text = get_log_text(kernel)
    assert ': command not found' in text, text

@@ -1,24 +1,58 @@
+%0Afrom IPython.display import HTML%0A
 %0Afrom metakernel.tests.u
@@ -623,12 +623,71 @@
  text, text%0A
+    %0A    html = HTML(%22some html%22)%0A    kernel.Display(html)%0A

test displaying objects in ProcessMetaKernel