MCPcopy Create free account
hub / github.com/plotly/plotly.py / test_json_renderer_show

Function test_json_renderer_show

tests/test_io/test_renderers.py:64–73  ·  view source on GitHub ↗
(fig1)

Source from the content-addressed store, hash-verified

62
63
64def test_json_renderer_show(fig1):
65 pio.renderers.default = "json"
66 expected_bundle = {
67 "application/json": json.loads(pio.to_json(fig1, remove_uids=False))
68 }
69
70 with mock.patch("IPython.display.display") as mock_display:
71 pio.show(fig1)
72
73 mock_display.assert_called_once_with(expected_bundle, raw=True)
74
75
76def test_json_renderer_show_override(fig1):

Callers

nothing calls this directly

Calls 2

to_jsonMethod · 0.45
showMethod · 0.45

Tested by

no test coverage detected