Skip to content

Commit ea6a532

Browse files
committed
sort_keys
1 parent 1aad0b0 commit ea6a532

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

plotly/tests/test_optional/test_utils/test_utils.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ def test_figure_json_encoding():
3838
data = Data([s1, s2])
3939
figure = Figure(data=data)
4040

41-
js1 = json.dumps(s1, cls=utils._plotlyJSONEncoder)
42-
js2 = json.dumps(s2, cls=utils._plotlyJSONEncoder)
41+
js1 = json.dumps(s1, cls=utils._plotlyJSONEncoder, sort_keys=True)
42+
js2 = json.dumps(s2, cls=utils._plotlyJSONEncoder, sort_keys=True)
4343
assert(js1 == '{"y": [1, 2, 3], "x": [1, 2, 3], "z": '
4444
'[1, "A", "2014-01-05"], "type": "scatter3d"}')
4545
assert(js2 == '{"x": [1, 2, 3], "type": "scatter"}')
46-
json.dumps(data, cls=utils._plotlyJSONEncoder)
47-
json.dumps(figure, cls=utils._plotlyJSONEncoder)
46+
json.dumps(data, cls=utils._plotlyJSONEncoder, sort_keys=True)
47+
json.dumps(figure, cls=utils._plotlyJSONEncoder, sort_keys=True)

0 commit comments

Comments
 (0)