From 21e5074be99510e38e23dadd25310f97ddb4455f Mon Sep 17 00:00:00 2001 From: "Eric Z. Beard" Date: Fri, 6 Oct 2023 13:42:56 -0700 Subject: [PATCH] Add inputs and outputs to assertion message (#973) * Add inputs and outputs to assertion message * Remove verbose logging * Linting from black --------- Co-authored-by: Michael Maeng --- src/rpdk/core/contract/resource_client.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/rpdk/core/contract/resource_client.py b/src/rpdk/core/contract/resource_client.py index e88e0762..3427fd6b 100644 --- a/src/rpdk/core/contract/resource_client.py +++ b/src/rpdk/core/contract/resource_client.py @@ -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] @@ -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):