(fig1)
| 149 | |
| 150 | |
| 151 | def 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( |
nothing calls this directly
no test coverage detected