Skip to content

Commit 3d211ee

Browse files
committed
Sort items in join_dict, to guarantee a stable order for unit tests.
Since Python 3.7, dict.items() guarantees insertion order, but before, the order is undefined. To have reproducible output for tests, the params are now sorted lexicographically.
1 parent 4378568 commit 3d211ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

PySpice/Tools/StringTools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,5 +65,5 @@ def join_list(items):
6565

6666
def join_dict(d):
6767
return ' '.join(["{}={}".format(key, str_spice(value))
68-
for key, value in d.items()
68+
for key, value in sorted(d.items())
6969
if value is not None])

0 commit comments

Comments
 (0)