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

Function test_rich_output

IPython/utils/tests/test_capture.py:76–85  ·  view source on GitHub ↗

test RichOutput basics

()

Source from the content-addressed store, hash-verified

74 yield nt.assert_equal, getattr(rich, method)(), None
75
76def test_rich_output():
77 """test RichOutput basics"""
78 data = basic_data
79 metadata = basic_metadata
80 rich = capture.RichOutput(data=data, metadata=metadata)
81 yield nt.assert_equal, rich._repr_html_(), data['text/html']
82 yield nt.assert_equal, rich._repr_png_(), (data['image/png'], metadata['image/png'])
83 yield nt.assert_equal, rich._repr_latex_(), None
84 yield nt.assert_equal, rich._repr_javascript_(), None
85 yield nt.assert_equal, rich._repr_svg_(), None
86
87def test_rich_output_no_metadata():
88 """test RichOutput with no metadata"""

Callers

nothing calls this directly

Calls 5

_repr_html_Method · 0.95
_repr_png_Method · 0.95
_repr_latex_Method · 0.95
_repr_javascript_Method · 0.95
_repr_svg_Method · 0.95

Tested by

no test coverage detected