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

Function test_capture_output_no_stdout

IPython/utils/tests/test_capture.py:127–136  ·  view source on GitHub ↗

test capture_output(stdout=False)

()

Source from the content-addressed store, hash-verified

125 yield nt.assert_equal, hello_stderr, cap.stderr
126
127def test_capture_output_no_stdout():
128 """test capture_output(stdout=False)"""
129 rich = capture.RichOutput(data=full_data)
130 with capture.capture_output(stdout=False) as cap:
131 print(hello_stdout, end="")
132 print(hello_stderr, end="", file=sys.stderr)
133 rich.display()
134 yield nt.assert_equal, "", cap.stdout
135 yield nt.assert_equal, hello_stderr, cap.stderr
136 yield nt.assert_equal, len(cap.outputs), 1
137
138def test_capture_output_no_stderr():
139 """test capture_output(stderr=False)"""

Callers

nothing calls this directly

Calls 1

displayMethod · 0.95

Tested by

no test coverage detected