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

Function test_json_renderer_show_override

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

Source from the content-addressed store, hash-verified

74
75
76def test_json_renderer_show_override(fig1):
77 pio.renderers.default = "notebook"
78 expected_bundle = {
79 "application/json": json.loads(pio.to_json(fig1, remove_uids=False))
80 }
81
82 with mock.patch("IPython.display.display") as mock_display:
83 pio.show(fig1, renderer="json")
84
85 mock_display.assert_called_once_with(expected_bundle, raw=True)
86
87
88# Plotly mimetype

Callers

nothing calls this directly

Calls 2

to_jsonMethod · 0.45
showMethod · 0.45

Tested by

no test coverage detected