Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add inputs and outputs to assertion message #973

Merged
merged 3 commits into from
Oct 6, 2023
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/rpdk/core/contract/resource_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ def _prune_properties_for_all_sequence_members(document: dict, path: list) -> di
_prop, resolved_paths = traverse_path_for_sequence_members(document, path)
except LookupError:
# not found means nothing to delete
LOG.info(LOOKUP_ERROR_MESSAGE_FORMAT, document, path)
#LOG.info(LOOKUP_ERROR_MESSAGE_FORMAT, document, path)
pass
else:
# paths with indices are gathered in increasing order, but we need to prune in reverse order
resolved_paths = resolved_paths[::-1]
Expand Down Expand Up @@ -480,6 +481,8 @@ def compare_model(self, inputs, outputs, path=()):
else:
assert inputs == outputs, assertion_error_message
except Exception as exception:
assertion_error_message += ", inputs: " + json.dumps(inputs)
assertion_error_message += ", outputs: " + json.dumps(outputs)
raise AssertionError(assertion_error_message) from exception

def compare_collection(self, inputs, outputs, is_ordered, path):
Expand Down