Skip to content

Commit

Permalink
Running python tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hiltonlima committed Sep 19, 2024
1 parent fa82803 commit ddfe5f5
Showing 1 changed file with 1 addition and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit ddfe5f5

Please sign in to comment.