Skip to content

Conversation

@SilverBzH
Copy link
Contributor

The reset is currently being done in the setup_test
hence it is executed for each tests even if the test is skipped.
Doing the reset on the teardown let us skip the reset when it is
not desired such as after a skipped test.

This reduce considerably the overall time for the tests execution.

The reset is currently being done in the setup_test
hence it is executed for each tests even if the test is skipped.
Doing the reset on the teardown let us skip the reset when it is
not desired such as after a skipped test.

This reduce considerably the overall time for the tests execution.
@SilverBzH SilverBzH requested a review from uael July 19, 2023 00:21
if isinstance(device, BumblePandoraDevice):
device.config.setdefault('classic_enabled', True)

await asyncio.gather(self.dut.reset(), self.ref.reset())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reset on setup class isnt necessary

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we don't have a reset on the setup_class, then if the test is skipped and there is only one test then it's gonna hang for ever on the Pandora apk shutdown. Maybe we can do the reset in the teardown in the case we have only one test and it is skipped. What do you think ?

if isinstance(device, BumblePandoraDevice):
device.config.setdefault('classic_enabled', True)

await asyncio.gather(self.dut.reset(), self.ref.reset())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above

if isinstance(device, BumblePandoraDevice):
device.config.setdefault('classic_enabled', True)

await asyncio.gather(self.dut.reset(), self.ref.reset())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above

if self.devices:
self.devices.stop_all()

@avatar.asynchronous
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you remove the reset on setup_class as well ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants