Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c17a717

Browse files
committed
Tricky! Dict ordering / hash table! (more)
This test was actually dependent on what order or what subset of the tests you were running!
1 parent 0bd43fd commit c17a717

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

plotly/tests/test_optional/test_utils/test_utils.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ def test_column_json_encoding():
2222
Column(mixed_list, 'col 2'),
2323
Column(np_list, 'col 3')
2424
]
25-
json_columns = json.dumps(columns, cls=utils._plotlyJSONEncoder)
25+
json_columns = json.dumps(
26+
columns, cls=utils._plotlyJSONEncoder, sort_keys=True
27+
)
2628
assert('[{"data": [1, 2, 3], "name": "col 1"}, '
2729
'{"data": [1, "A", "2014-01-05"], "name": "col 2"}, '
2830
'{"data": [1, 2, 3], "name": "col 3"}]' == json_columns)

0 commit comments

Comments
 (0)