I want to compare the length of the two dictionaries as well as each key,value pair in each dictionary. I also need to be able to print out if there is no match when looking for it.
My current code seems to pass on the length criteria but fails when trying to match elements:
assert_that(len(model_dict), len(server_dict))
for x in model_dict:
if x not in server_dict and model_dict[x] != server_dict[x]:
print(x, model_dict[x])
server_dict example of one entry in dictionary:
{2847001: [[[-94.8, 28], [-95.4, 28], [-96, 28], [-96.5, 28.1], [-96.667, 28.133], [-97, 28.2], [-97.6, 28.3], [-98.3, 28.4], [-98.9, 28.6], [-99.4, 29], [-99.8, 29.5], [-100, 30], [-100.1, 30.5], [-100.2, 31]]]}
model_dict example of one entry in dictionary:
{2847001: [[-94.8, 28], [-95.4, 28], [-96, 28], [-96.5, 28.1], [-96.667, 28.133], [-97, 28.2], [-97.6, 28.3], [-98.3, 28.4], [-98.9, 28.6], [-99.4, 29], [-99.8, 29.5], [-100, 30], [-100.1, 30.5], [-100.2, 31]]}