Skip to content

Commit

Permalink
Python testing: Fix skip_ to use test plan numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
cecille committed Feb 14, 2024
1 parent 1913dba commit e371189
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/python_testing/matter_testing_support.py
Original file line number Diff line number Diff line change
Expand Up @@ -1008,9 +1008,11 @@ def skip_all_remaining_steps(self, starting_step):
test is more deliberately identifying where test skips are starting from, making
it easier to validate against the test plan for correctness.
'''
last_step = len(self.get_test_steps(self.current_test_info.name)) + 1
for index in range(starting_step, last_step):
self.skip_step(index)
steps = self.get_test_steps(self.current_test_info.name)
starting_step = [idx for idx, step in enumerate(steps) if step.test_plan_number == starting_step][0]
remaining = steps[starting_step:]
for step in remaining:
self.skip_step(step.test_plan_number)

def step(self, step: typing.Union[int, str]):
test_name = self.current_test_info.name
Expand Down

0 comments on commit e371189

Please sign in to comment.