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

Function test_capture_output

IPython/utils/tests/test_capture.py:117–125  ·  view source on GitHub ↗

capture_output works

()

Source from the content-addressed store, hash-verified

115 yield nt.assert_equal, rich2.metadata, rich.metadata
116
117def test_capture_output():
118 """capture_output works"""
119 rich = capture.RichOutput(data=full_data)
120 with capture.capture_output() as cap:
121 print(hello_stdout, end="")
122 print(hello_stderr, end="", file=sys.stderr)
123 rich.display()
124 yield nt.assert_equal, hello_stdout, cap.stdout
125 yield nt.assert_equal, hello_stderr, cap.stderr
126
127def test_capture_output_no_stdout():
128 """test capture_output(stdout=False)"""

Callers

nothing calls this directly

Calls 1

displayMethod · 0.95

Tested by

no test coverage detected