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

Function test_capture_display_hook_format

IPython/core/tests/test_displayhook.py:106–112  ·  view source on GitHub ↗

Tests that the capture display hook conforms to the CapturedIO output format

()

Source from the content-addressed store, hash-verified

104 ip.ast_node_interactivity = saved_mode
105
106def test_capture_display_hook_format():
107 """Tests that the capture display hook conforms to the CapturedIO output format"""
108 hook = CapturingDisplayHook(ip)
109 hook({"foo": "bar"})
110 captured = CapturedIO(sys.stdout, sys.stderr, hook.outputs)
111 # Should not raise with RichOutput transformation error
112 captured.outputs

Callers

nothing calls this directly

Calls 2

CapturedIOClass · 0.90

Tested by

no test coverage detected