Skip to content

Commit eb18b1f

Browse files
cecilletehampson
andauthored
Update src/python_testing/matter_testing_support.py
Co-authored-by: Terence Hampson <thampson@google.com>
1 parent e371189 commit eb18b1f

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/python_testing/matter_testing_support.py

+7-2
Original file line numberDiff line numberDiff line change
@@ -1009,8 +1009,13 @@ def skip_all_remaining_steps(self, starting_step):
10091009
it easier to validate against the test plan for correctness.
10101010
'''
10111011
steps = self.get_test_steps(self.current_test_info.name)
1012-
starting_step = [idx for idx, step in enumerate(steps) if step.test_plan_number == starting_step][0]
1013-
remaining = steps[starting_step:]
1012+
for idx, step in enumerate(steps):
1013+
if step.test_plan_number == starting_step:
1014+
starting_step_idx = idx
1015+
break
1016+
else:
1017+
raise TestingExpection("skip_all_remaining_steps was provided with invalid starting_step_num")
1018+
remaining = steps[starting_step_idx:]
10141019
for step in remaining:
10151020
self.skip_step(step.test_plan_number)
10161021

0 commit comments

Comments
 (0)