MCPcopy Create free account
hub / github.com/ipython/ipython / test_script_bg_out_err

Function test_script_bg_out_err

IPython/core/tests/test_magic.py:994–1000  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

992
993@dec.skip_win32
994def test_script_bg_out_err():
995 ip = get_ipython()
996 ip.run_cell_magic("script", "--bg --out output --err error sh", "echo 'hi'\necho 'hello' >&2")
997 nt.assert_equal(ip.user_ns['output'].read(), b'hi\n')
998 nt.assert_equal(ip.user_ns['error'].read(), b'hello\n')
999 ip.user_ns['output'].close()
1000 ip.user_ns['error'].close()
1001
1002def test_script_defaults():
1003 ip = get_ipython()

Callers

nothing calls this directly

Calls 4

get_ipythonFunction · 0.90
run_cell_magicMethod · 0.80
readMethod · 0.80
closeMethod · 0.45

Tested by

no test coverage detected