Skip to content

Commit

Permalink
Handle logging.info at matter_testing_support.py (project-chip#36070)
Browse files Browse the repository at this point in the history
* Handle logging.info at matter_testing_support.py

* Move self.print_step instruction

* restyled
  • Loading branch information
rquidute authored Oct 17, 2024
1 parent c03ffef commit d5886bc
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1429,8 +1429,7 @@ def mark_current_step_skipped(self):
# TODO: I very much do not want to have people passing in strings here. Do we really need the expression
# as a string? Does it get used by the TH?
self.runner_hook.step_skipped(name=str(num), expression="")
else:
logging.info(f'**** Skipping: {num}')
logging.info(f'**** Skipping: {num}')
self.step_skipped = True

def skip_step(self, step):
Expand Down Expand Up @@ -1465,6 +1464,8 @@ def step(self, step: typing.Union[int, str], endpoint: Optional[int] = None):
asserts.fail(f'Unexpected test step: {step} - steps not called in order, or step does not exist')

current_step = steps[self.current_step_index]
self.print_step(step, current_step.description, endpoint)

if self.runner_hook:
# If we've reached the next step with no assertion and the step wasn't skipped, it passed
if not self.step_skipped and self.current_step_index != 0:
Expand All @@ -1477,11 +1478,7 @@ def step(self, step: typing.Union[int, str], endpoint: Optional[int] = None):
# TODO: it seems like the step start should take a number and a name
name = f'{step} : {current_step.description}'

self.print_step(step, current_step.description, endpoint)
self.runner_hook.step_start(name=name, endpoint=current_step.endpoint)
else:
self.print_step(step, current_step.description)

self.step_start_time = datetime.now(tz=timezone.utc)
self.current_step_index += 1
self.step_skipped = False
Expand Down

0 comments on commit d5886bc

Please sign in to comment.