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

Function test_rich_output_display

IPython/utils/tests/test_capture.py:102–115  ·  view source on GitHub ↗

test RichOutput.display This is a bit circular, because we are actually using the capture code we are testing to test itself.

()

Source from the content-addressed store, hash-verified

100 yield nt.assert_equal, getattr(rich, method)(), (data[mime], metadata[mime])
101
102def test_rich_output_display():
103 """test RichOutput.display
104
105 This is a bit circular, because we are actually using the capture code we are testing
106 to test itself.
107 """
108 data = full_data
109 rich = capture.RichOutput(data=data)
110 with capture.capture_output() as cap:
111 rich.display()
112 yield nt.assert_equal, len(cap.outputs), 1
113 rich2 = cap.outputs[0]
114 yield nt.assert_equal, rich2.data, rich.data
115 yield nt.assert_equal, rich2.metadata, rich.metadata
116
117def test_capture_output():
118 """capture_output works"""

Callers

nothing calls this directly

Calls 1

displayMethod · 0.95

Tested by

no test coverage detected