Skip to content

Commit

Permalink
Fix diff level
Browse files Browse the repository at this point in the history
Signed-off-by: Tyler Gu <[email protected]>
  • Loading branch information
tylergu committed Feb 26, 2024
1 parent 0cff773 commit 5e67b1b
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions acto/post_process/post_diff_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -964,33 +964,33 @@ def __get_diff_paths(self, diff_test_result: DiffTestResult) -> list[str]:
if diff_result is not None:
for diff_category, diff in diff_result.diff.items():
if diff_category == "dictionary_item_removed":
removed_items: list[str] = diff
removed_items: list[DiffLevel] = diff
for removed_item in removed_items:
removed_item = re.escape(removed_item)
removed_item = re.escape(removed_item.path())
if first_step:
initial_regex.add(removed_item)
else:
indeterministic_regex.add(removed_item)
elif diff_category == "dictionary_item_added":
added_items: list[str] = diff
added_items: list[DiffLevel] = diff
for added_item in added_items:
added_item = re.escape(added_item)
added_item = re.escape(added_item.path())
if first_step:
initial_regex.add(added_item)
else:
indeterministic_regex.add(added_item)
elif diff_category == "values_changed":
changed_items: dict[str, dict] = diff
for changed_item in changed_items.keys():
changed_item = re.escape(changed_item)
changed_items: list[DiffLevel] = diff
for changed_item in changed_items:
changed_item = re.escape(changed_item.path())
if first_step:
initial_regex.add(changed_item)
else:
indeterministic_regex.add(changed_item)
elif diff_category == "type_changes":
type_changes: dict[str, dict] = diff
for type_change in type_changes.keys():
type_change = re.escape(type_change)
type_changes: list[DiffLevel] = diff
for type_change in type_changes:
type_change = re.escape(type_change.path())
if first_step:
initial_regex.add(type_change)
else:
Expand Down

0 comments on commit 5e67b1b

Please sign in to comment.