From ddfe5f5f6a908d8cdb7d23a405b6ff87ec2c7307 Mon Sep 17 00:00:00 2001 From: Hilton Lima Date: Thu, 19 Sep 2024 18:59:54 +0000 Subject: [PATCH] Running python tests --- .../python_testing/models/test_case.py | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) 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 c31e646a..c4600029 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 @@ -87,13 +87,6 @@ def __init__(self, test_case_execution: TestCaseExecution) -> None: # Move to the next step if the test case has additional steps apart from the 2 # deafult ones def step_over(self) -> None: - # Python tests that don't follow the template only have the default steps "Start - # Python test" and "Show test logs", but inside the file there can be more than - # one test case, so the hooks' step methods will continue to be called - if self.python_test.python_test_type == PythonTestType.LEGACY: - # REMOVE if len(self.test_steps) == 2: - return - self.next_step() def start(self, count: int) -> None: @@ -128,17 +121,7 @@ def step_failure( self, logger: Any, logs: str, duration: int, request: Any, received: Any ) -> None: self.mark_step_failure("Python test step failure") - - # Python tests with only 2 steps are the ones that don't follow the template. - # In the case of a test file with multiple test cases, more than one of these - # tests can fail and so this method will be called for each of them. These - # failures should be reported in the first step and moving to the logs step - # should only happen after all test cases are executed. - if self.python_test.python_test_type != PythonTestType.LEGACY: - # REMOVE if len(self.test_steps) > 2: - # Python tests stop when there's a failure. We need to skip the next steps - # and execute only the last one, which shows the logs - self.skip_to_last_step() + self.skip_to_last_step() def step_unknown(self) -> None: self.__runned += 1