def test_capture_out():
    s = StringIO()
    p = PipedProcess('echo 1', out_callback=s.write, )
    p.start()
    p.join()
    result = s.getvalue().rstrip()
    assert result == '1'
A simple test to see if we can execute a process and get the output.
dataset/ETHPy150Open ipython/ipython-py3k/IPython/deathrow/oldfrontend/tests/test_process.py/test_capture_out