Skip to content

Commit e371189

Browse files
committed
Python testing: Fix skip_ to use test plan numbers
1 parent 1913dba commit e371189

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/python_testing/matter_testing_support.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -1008,9 +1008,11 @@ def skip_all_remaining_steps(self, starting_step):
10081008
test is more deliberately identifying where test skips are starting from, making
10091009
it easier to validate against the test plan for correctness.
10101010
'''
1011-
last_step = len(self.get_test_steps(self.current_test_info.name)) + 1
1012-
for index in range(starting_step, last_step):
1013-
self.skip_step(index)
1011+
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:]
1014+
for step in remaining:
1015+
self.skip_step(step.test_plan_number)
10141016

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

0 commit comments

Comments
 (0)