Skip to content

Commit

Permalink
Add inputs and outputs to assertion message (#973)
Browse files Browse the repository at this point in the history
* Add inputs and outputs to assertion message

* Remove verbose logging

* Linting from black

---------

Co-authored-by: Michael Maeng <[email protected]>
  • Loading branch information
ericzbeard and Michael Maeng authored Oct 6, 2023
1 parent 2d5fea7 commit 21e5074
Showing 1 changed file with 4 additions and 1 deletion.
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 @@ -499,6 +500,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

0 comments on commit 21e5074

Please sign in to comment.