Skip to content

Commit

Permalink
added one more test for #344
Browse files Browse the repository at this point in the history
  • Loading branch information
seperman committed Nov 27, 2023
1 parent b775e4f commit 6abf249
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/test_ignore_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,22 @@ def test_list_difference_ignore_order_report_repetition3(self):
}
assert result2 == ddiff2

@pytest.mark.skip
def test_list_difference_ignore_order_report_repetition4(self):
t1 = [{"id": 1}, {"id": 1}, {"id": 1}, {"name": "Joe"}, {"name": "Joe"}]
t2 = [{"id": 1, "name": 1}, {"id": 1, "name": "Joe"}]

ddiff2 = DeepDiff(t1, t2, ignore_order=True, report_repetition=True, cutoff_intersection_for_pairs=1, cutoff_distance_for_pairs=1)
result2 = {
'iterable_item_removed': {
'root[2]': {"id": 1},
'root[3]': {"name": "Joe"},
'root[4]': {"name": "Joe"},
},
'dictionary_item_added': ["root[0]['name']", "root[1]['name']"]
}
assert result2 == ddiff2

def test_nested_list_ignore_order_report_repetition(self):
t1 = [1, 2, [3, 4]]
t2 = [[4, 3, 3], 2, 1]
Expand Down

0 comments on commit 6abf249

Please sign in to comment.