From b3a79879b751c6e223d91c766391b06c624970b2 Mon Sep 17 00:00:00 2001 From: Hilton Lima Date: Mon, 9 Sep 2024 11:28:22 +0000 Subject: [PATCH 1/4] replace erro with warning --- .../python_testing/models/python_test_parser.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/test_collections/matter/sdk_tests/support/python_testing/models/python_test_parser.py b/test_collections/matter/sdk_tests/support/python_testing/models/python_test_parser.py index b9f1fbf6..8f8443a3 100644 --- a/test_collections/matter/sdk_tests/support/python_testing/models/python_test_parser.py +++ b/test_collections/matter/sdk_tests/support/python_testing/models/python_test_parser.py @@ -158,8 +158,8 @@ def __parse_test_case( try: tc_desc = __retrieve_description(desc_method) except Exception as e: - logger.error( - f"Error while parsing description for {tc_name}, Error:{str(e)}" + logger.warning( + f"Fail parsing description methood for {tc_name}, Error:{str(e)}" ) # If the python test does not implement the steps template method, @@ -170,14 +170,14 @@ def __parse_test_case( try: tc_steps = __retrieve_steps(steps_method) except Exception as e: - logger.error(f"Error while parsing steps for {tc_name}, Error:{str(e)}") + logger.warning(f"Fail parsing steps method for {tc_name}, Error:{str(e)}") pics_method = __get_method_by_name(pics_method_name, methods) if pics_method: try: tc_pics = __retrieve_pics(pics_method) except Exception as e: - logger.error(f"Error while parsing PICS for {tc_name}, Error:{str(e)}") + logger.warning(f"Fail parsing PICS method for {tc_name}, Error:{str(e)}") # - PythonTestType.COMMISSIONING: test cases that have a commissioning first step # - PythonTestType.NO_COMMISSIONING: test cases that follow the expected template @@ -237,7 +237,9 @@ def __retrieve_steps(method: FunctionDefType) -> List[MatterTestStep]: step_name = step.args[ARG_STEP_DESCRIPTION_INDEX].value parsed_step_name = step_name except Exception as e: - logger.error(f"Error while parsing step from {method.name}, Error:{str(e)}") + logger.warning( + f"Fail parsing step name from {method.name}, Error:{str(e)}" + ) parsed_step_name = "UNABLE TO PARSE TEST STEP NAME" python_steps.append( From 0f42545cf94b1fea2424f2c5be83f49f449abf19 Mon Sep 17 00:00:00 2001 From: hiltonlima <116589806+hiltonlima@users.noreply.github.com> Date: Mon, 9 Sep 2024 12:03:47 -0300 Subject: [PATCH 2/4] Update test_collections/matter/sdk_tests/support/python_testing/models/python_test_parser.py Co-authored-by: Carolina Lopes <116589288+ccruzagralopes@users.noreply.github.com> --- .../support/python_testing/models/python_test_parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test_collections/matter/sdk_tests/support/python_testing/models/python_test_parser.py b/test_collections/matter/sdk_tests/support/python_testing/models/python_test_parser.py index 8f8443a3..5af1e5e7 100644 --- a/test_collections/matter/sdk_tests/support/python_testing/models/python_test_parser.py +++ b/test_collections/matter/sdk_tests/support/python_testing/models/python_test_parser.py @@ -159,7 +159,7 @@ def __parse_test_case( tc_desc = __retrieve_description(desc_method) except Exception as e: logger.warning( - f"Fail parsing description methood for {tc_name}, Error:{str(e)}" + f"Failed parsing description method for {tc_name}, Error:{str(e)}" ) # If the python test does not implement the steps template method, From e44f9bc8bea1464b8f8745ec5131585f571077c7 Mon Sep 17 00:00:00 2001 From: Hilton Lima Date: Mon, 9 Sep 2024 15:11:33 +0000 Subject: [PATCH 3/4] black error fix --- .../support/python_testing/models/python_test_parser.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/test_collections/matter/sdk_tests/support/python_testing/models/python_test_parser.py b/test_collections/matter/sdk_tests/support/python_testing/models/python_test_parser.py index 5af1e5e7..07ddd85b 100644 --- a/test_collections/matter/sdk_tests/support/python_testing/models/python_test_parser.py +++ b/test_collections/matter/sdk_tests/support/python_testing/models/python_test_parser.py @@ -237,9 +237,7 @@ def __retrieve_steps(method: FunctionDefType) -> List[MatterTestStep]: step_name = step.args[ARG_STEP_DESCRIPTION_INDEX].value parsed_step_name = step_name except Exception as e: - logger.warning( - f"Fail parsing step name from {method.name}, Error:{str(e)}" - ) + logger.warning(f"Fail parsing step name from {method.name}, Error:{str(e)}") parsed_step_name = "UNABLE TO PARSE TEST STEP NAME" python_steps.append( From bd15f75542cae27f1237c67dc1296326d7f458bc Mon Sep 17 00:00:00 2001 From: Hilton Lima Date: Mon, 9 Sep 2024 19:26:05 +0000 Subject: [PATCH 4/4] pr review --- .../support/python_testing/models/python_test_parser.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test_collections/matter/sdk_tests/support/python_testing/models/python_test_parser.py b/test_collections/matter/sdk_tests/support/python_testing/models/python_test_parser.py index 07ddd85b..8e390740 100644 --- a/test_collections/matter/sdk_tests/support/python_testing/models/python_test_parser.py +++ b/test_collections/matter/sdk_tests/support/python_testing/models/python_test_parser.py @@ -170,14 +170,14 @@ def __parse_test_case( try: tc_steps = __retrieve_steps(steps_method) except Exception as e: - logger.warning(f"Fail parsing steps method for {tc_name}, Error:{str(e)}") + logger.warning(f"Failed parsing steps method for {tc_name}, Error:{str(e)}") pics_method = __get_method_by_name(pics_method_name, methods) if pics_method: try: tc_pics = __retrieve_pics(pics_method) except Exception as e: - logger.warning(f"Fail parsing PICS method for {tc_name}, Error:{str(e)}") + logger.warning(f"Failed parsing PICS method for {tc_name}, Error:{str(e)}") # - PythonTestType.COMMISSIONING: test cases that have a commissioning first step # - PythonTestType.NO_COMMISSIONING: test cases that follow the expected template @@ -237,7 +237,9 @@ def __retrieve_steps(method: FunctionDefType) -> List[MatterTestStep]: step_name = step.args[ARG_STEP_DESCRIPTION_INDEX].value parsed_step_name = step_name except Exception as e: - logger.warning(f"Fail parsing step name from {method.name}, Error:{str(e)}") + logger.warning( + f"Failed parsing step name from {method.name}, Error:{str(e)}" + ) parsed_step_name = "UNABLE TO PARSE TEST STEP NAME" python_steps.append(