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

Method test_capture_output

IPython/utils/tests/test_io.py:81–89  ·  view source on GitHub ↗

capture_output() context works

(self)

Source from the content-addressed store, hash-verified

79 iostream.close()
80
81 def test_capture_output(self):
82 """capture_output() context works"""
83
84 with capture_output() as io:
85 print('hi, stdout')
86 print('hi, stderr', file=sys.stderr)
87
88 nt.assert_equal(io.stdout, 'hi, stdout\n')
89 nt.assert_equal(io.stderr, 'hi, stderr\n')

Callers

nothing calls this directly

Calls 1

capture_outputClass · 0.85

Tested by

no test coverage detected