We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d51fd94 commit 042c54cCopy full SHA for 042c54c
packages/python/plotly/plotly/tests/test_optional/test_offline/test_offline.py
@@ -10,6 +10,7 @@
10
import pytest
11
12
import plotly
13
+import plotly.io as pio
14
from plotly import optional_imports
15
16
matplotlylib = optional_imports.get_module("plotly.matplotlylib")
@@ -76,12 +77,8 @@ def test_default_mpl_plot_generates_expected_html(self):
76
77
data = figure["data"]
78
79
layout = figure["layout"]
- data_json = _json.dumps(
80
- data, cls=plotly.utils.PlotlyJSONEncoder, sort_keys=True
81
- )
82
- layout_json = _json.dumps(
83
- layout, cls=plotly.utils.PlotlyJSONEncoder, sort_keys=True
84
+ data_json = pio.json.to_json_plotly(data)
+ layout_json = pio.json.to_json_plotly(layout)
85
html = self._read_html(plotly.offline.plot_mpl(fig))
86
87
# blank out uid before comparisons
0 commit comments