MCPcopy Index your code
hub / github.com/plotly/plotly.py / test_colab_renderer_show

Function test_colab_renderer_show

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

Source from the content-addressed store, hash-verified

149
150
151def test_colab_renderer_show(fig1):
152 pio.renderers.default = "colab"
153
154 with mock.patch("IPython.display.display") as mock_display:
155 pio.show(fig1)
156
157 # Get display call arguments
158 mock_call_args = mock_display.call_args
159 mock_arg1 = mock_call_args[0][0]
160
161 # Check for html bundle
162 assert list(mock_arg1) == ["text/html"]
163
164 # Check html contents
165 html = mock_arg1["text/html"]
166 assert_full_html(html)
167 assert_html_renderer_connected(html)
168
169 # check kwargs
170 mock_kwargs = mock_call_args[1]
171 assert mock_kwargs == {"raw": True}
172
173
174@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 3

assert_full_htmlFunction · 0.85
showMethod · 0.45

Tested by

no test coverage detected