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

Function test_capture_output_no_stderr

IPython/utils/tests/test_capture.py:138–148  ·  view source on GitHub ↗

test capture_output(stderr=False)

()

Source from the content-addressed store, hash-verified

136 yield nt.assert_equal, len(cap.outputs), 1
137
138def test_capture_output_no_stderr():
139 """test capture_output(stderr=False)"""
140 rich = capture.RichOutput(data=full_data)
141 # add nested capture_output so stderr doesn't make it to nose output
142 with capture.capture_output(), capture.capture_output(stderr=False) as cap:
143 print(hello_stdout, end="")
144 print(hello_stderr, end="", file=sys.stderr)
145 rich.display()
146 yield nt.assert_equal, hello_stdout, cap.stdout
147 yield nt.assert_equal, "", cap.stderr
148 yield nt.assert_equal, len(cap.outputs), 1
149
150def test_capture_output_no_display():
151 """test capture_output(display=False)"""

Callers

nothing calls this directly

Calls 1

displayMethod · 0.95

Tested by

no test coverage detected