File tree 1 file changed +3
-3
lines changed
packages/python/plotly/plotly/tests/test_core/test_offline
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ def _read_html(self, file_url):
88
88
return f .read ()
89
89
90
90
def test_default_plot_generates_expected_html (self ):
91
- layout_json = _json . dumps (fig ["layout" ], cls = plotly . utils . PlotlyJSONEncoder )
91
+ layout_json = pio . json . to_json_plotly (fig ["layout" ])
92
92
93
93
html = self ._read_html (
94
94
plotly .offline .plot (fig , auto_open = False , filename = html_filename )
@@ -98,8 +98,8 @@ def test_default_plot_generates_expected_html(self):
98
98
# instead just make sure a few of the parts are in here?
99
99
self .assertIn ("Plotly.newPlot" , html ) # plot command is in there
100
100
101
- x_data = '"x": [1, 2, 3]'
102
- y_data = '"y": [10, 20, 30]'
101
+ x_data = '"x":[1,2, 3]'
102
+ y_data = '"y":[10,20,30]'
103
103
104
104
self .assertTrue (x_data in html and y_data in html ) # data in there
105
105
self .assertIn (layout_json , html ) # so is layout
You can’t perform that action at this time.
0 commit comments