(fig1)
| 62 | |
| 63 | |
| 64 | def 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 | |
| 76 | def test_json_renderer_show_override(fig1): |