@dec.skip_win32
def test_script_bg_out():
    ip = get_ipython()
    ip.run_cell_magic('script', '--bg --out output sh', "echo 'hi'")
    nt.assert_equal(ip.user_ns['output'].read(), b'hi\n')
    ip.user_ns['output'].close()
@dec.skip_win32
def test_script_bg_out():
    ip = get_ipython()
    ip.run_cell_magic('script', '--bg --out output sh', "echo 'hi'")
    nt.assert_equal(ip.user_ns['output'].read(), b'hi\n')
    ip.user_ns['output'].close()