Skip to content

Commit

Permalink
adjust helper fn
Browse files Browse the repository at this point in the history
  • Loading branch information
josectobar committed Feb 23, 2024
1 parent dfce7ef commit 5d1d3cd
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions tests/expectations/test_expectation_arguments.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,8 @@ def assert_exception_info(
# TODO JT: This accounts for a dictionary of type {"metric_id": ExceptionInfo} path defined in
# validator._resolve_suite_level_graph_and_process_metric_evaluation_errors
for k, v in result["exception_info"].items():
if v:
assert ("exception_traceback" not in v.exception_info) or not v[
"exception_traceback"
]
assert ("exception_traceback" not in v.exception_info) or not v[
"exception_traceback"
]
assert ("exception_traceback" not in v) or not v["exception_traceback"]
assert ("exception_traceback" not in v) or not v["exception_traceback"]
elif "raised_exception" in result["exception_info"]:
assert (
"exception_traceback" in result.exception_info
Expand All @@ -51,14 +46,12 @@ def assert_exception_info(
]
if expected_exception_message:
assert result["exception_message"] == expected_exception_message
elif result["exception_info"]:
else:
# TODO JT: This accounts for a dictionary of type {"metric_id": ExceptionInfo} path defined in
# validator._resolve_suite_level_graph_and_process_metric_evaluation_errors
for k, v in result["exception_info"].items():
assert ("exception_traceback" in v.exception_info) and v[
"exception_traceback"
]
assert ("exception_message" in v.exception_info) and v["exception_message"]
assert ("exception_traceback" in v) and v["exception_traceback"]
assert ("exception_message" in v) and v["exception_message"]
if expected_exception_message:
assert v["exception_message"] == expected_exception_message

Expand Down

0 comments on commit 5d1d3cd

Please sign in to comment.