Skip to content

Commit a8b0c9a

Browse files
committed
compare keys for dicts
1 parent cd5c12a commit a8b0c9a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/compas/scene/test_scene_serialisation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ def assert_is_data_equal(obj1, obj2, path=""):
8686
return True
8787

8888
elif isinstance(obj1, dict):
89-
if len(obj1) != len(obj2):
90-
print("Length mismatch: {} != {} for {} and {}".format(len(obj1), len(obj2), path, path))
89+
if set(obj1.keys()) != set(obj2.keys()):
90+
print("Key mismatch: {} != {} for {} and {}".format(set(obj1.keys()), set(obj2.keys()), path, path))
9191
return False
9292

9393
for key in obj1:

0 commit comments

Comments
 (0)