File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
packages/python/plotly/plotly/tests/test_optional/test_offline Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change 1010import pytest
1111
1212import plotly
13+ import plotly .io as pio
1314from plotly import optional_imports
1415
1516matplotlylib = optional_imports .get_module ("plotly.matplotlylib" )
@@ -76,12 +77,8 @@ def test_default_mpl_plot_generates_expected_html(self):
7677 data = figure ["data" ]
7778
7879 layout = figure ["layout" ]
79- 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- )
80+ data_json = pio .json .to_json_plotly (data )
81+ layout_json = pio .json .to_json_plotly (layout )
8582 html = self ._read_html (plotly .offline .plot_mpl (fig ))
8683
8784 # blank out uid before comparisons
You can’t perform that action at this time.
0 commit comments