Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python testing: Fix skip_ to use test plan numbers #32130

Merged
merged 4 commits into from
Feb 15, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
cecille marked this conversation as resolved.
Show resolved Hide resolved
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)
cecille marked this conversation as resolved.
Show resolved Hide resolved

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