From c734c28718519aa408edfeadf62c29b51378ce62 Mon Sep 17 00:00:00 2001 From: Romulo Quidute Filho <116586593+rquidute@users.noreply.github.com> Date: Wed, 23 Oct 2024 10:40:08 -0300 Subject: [PATCH] Handle Skip test fir old script python test cases (#154) --- .../sdk_tests/support/python_testing/models/test_case.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/test_collections/matter/sdk_tests/support/python_testing/models/test_case.py b/test_collections/matter/sdk_tests/support/python_testing/models/test_case.py index 0863c074..b2486f03 100644 --- a/test_collections/matter/sdk_tests/support/python_testing/models/test_case.py +++ b/test_collections/matter/sdk_tests/support/python_testing/models/test_case.py @@ -115,7 +115,14 @@ def test_skipped(self, filename: str, name: str) -> None: self.skip_to_last_step() def step_skipped(self, name: str, expression: str) -> None: - self.current_test_step.mark_as_not_applicable("Test step skipped") + # From TH perspective, Legacy test cases shows only 2 steps in UI + # but it may have several in the script file. + # So TH should not skip the step in order to keep the test execution flow + skiped_msg = "Test step skipped" + if self.python_test.python_test_type == PythonTestType.LEGACY: + logger.info(skiped_msg) + else: + self.current_test_step.mark_as_not_applicable(skiped_msg) def step_start(self, name: str) -> None: self.step_over()