Skip to content

Commit 1c4e274

Browse files
committed
change test
1 parent f51b512 commit 1c4e274

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

tests/test_diff_text.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1412,11 +1412,13 @@ def test_include_obj_callback_strict(self):
14121412
def include_obj_callback_strict(obj, path):
14131413
return True if isinstance(obj, int) and obj > 10 else False
14141414

1415-
t1 = {"x": 10, "y": "b", "z": "c"}
1416-
t2 = {"x": 12, "y": "b", "z": "c"}
1415+
t1 = {"x": 11, "y": 10, "z": "c"}
1416+
t2 = {"x": 12, "y": 12, "z": "c"}
14171417
ddiff = DeepDiff(t1, t2, include_obj_callback_strict=include_obj_callback_strict)
1418-
result = {}
1418+
result = {'values_changed': {"root['x']": {'new_value': 12, 'old_value': 11}}}
14191419
assert result == ddiff
1420+
assert {"root['x']"} == ddiff.affected_paths
1421+
assert {"x"} == ddiff.affected_root_keys
14201422

14211423
def test_skip_exclude_obj_callback(self):
14221424
def exclude_obj_callback(obj, path):

0 commit comments

Comments
 (0)