Skip to content

Commit

Permalink
Changes after code review
Browse files Browse the repository at this point in the history
  • Loading branch information
rquidute committed Oct 24, 2023
1 parent 4ab9008 commit 1564581
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions scripts/py_matter_yamltests/matter_yamltests/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -844,7 +844,6 @@ def _response_cluster_wait_validation(self, received_responses, result):
received_value = received_values.pop(0)

if expected_value != received_value:
logging.warning(f"Cluster wait validation mismatch: Expected Result: {expected_value} / Received Value: {received_value}")
result.error(check_type, error_failure.format(
expected=expected_value, received=received_value))
success = False
Expand All @@ -869,7 +868,6 @@ def _response_error_validation(self, expected_response, received_response, resul
result.success(check_type, error_success.format(
error=expected_error))
elif expected_error and received_error:
logging.warning(f"Response error validation mismatch: Expected Error: {expected_error} / Received Error: {received_error}")
result.error(check_type, error_wrong_error.format(
error=expected_error, value=received_error))
elif expected_error and not received_error:
Expand Down Expand Up @@ -898,7 +896,6 @@ def _response_cluster_error_validation(self, expected_response, received_respons
result.success(check_type, error_success.format(
error=expected_error))
elif received_error:
logging.warning(f"Response cluster validation mismatch: Expected Error: {expected_error} / Received Error: {received_error}")
result.error(check_type, error_wrong_error.format(
error=expected_error, value=received_error))
else:
Expand All @@ -925,7 +922,7 @@ def _response_values_source_validation(self, expected_response, received_respons
def _response_values_validation(self, expected_response, received_response, result):
check_type = PostProcessCheckType.RESPONSE_VALIDATION
error_success = 'The test expectation "{name} == {value}" is true'
error_failure = 'The test expectation "{name} == {value}" is false'
error_failure = 'The test expectation "{name} ({actual}) == {value}" is false'
error_name_does_not_exist = 'The test expects a value named "{name}" but it does not exists in the response."'
error_value_does_not_exist = 'The test expects a value but it does not exists in the response."'

Expand Down Expand Up @@ -955,9 +952,8 @@ def _response_values_validation(self, expected_response, received_response, resu
result.success(check_type, error_success.format(
name=expected_name, value=expected_value))
else:
logging.warning(f"Response values validation mismatch: Expected Result: {expected_value} / Received Value: {received_value}")
result.error(check_type, error_failure.format(
name=expected_name, value=expected_value))
name=expected_name, actual=received_value, value=expected_value))

def _response_value_validation(self, expected_value, received_value):
if isinstance(expected_value, list):
Expand Down

0 comments on commit 1564581

Please sign in to comment.