Skip to content

Commit

Permalink
Fix hocks step_ functions
Browse files Browse the repository at this point in the history
  • Loading branch information
hiltonlima committed Sep 17, 2024
1 parent e462572 commit fa82803
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ 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 len(self.test_steps) == 2:
if self.python_test.python_test_type == PythonTestType.LEGACY:
# REMOVE if len(self.test_steps) == 2:
return

self.next_step()
Expand Down Expand Up @@ -133,7 +134,8 @@ def step_failure(
# 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 len(self.test_steps) > 2:
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()
Expand Down

0 comments on commit fa82803

Please sign in to comment.