Skip to content

Conversation

@mhaoli
Copy link
Collaborator

@mhaoli mhaoli commented Dec 2, 2024

Background: Current implementation only searches for the test suite class in the __main__ module. But projects like BeToCQ are running in a different approach, which causes that test suite class is not in the __main__ module.

Change: When suite class is not found in the main module, search for it in the module of the caller of suite_runner.run_suite_class.


This change is Reviewable

@mhaoli mhaoli added this to the Mobly Release 1.13 milestone Dec 2, 2024
@mhaoli mhaoli self-assigned this Dec 2, 2024
xianyuanjia
xianyuanjia previously approved these changes Dec 2, 2024
Copy link
Collaborator

@xianyuanjia xianyuanjia left a comment

Choose a reason for hiding this comment

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

Reviewed 3 of 3 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @mhaoli and @xpconanfan)


mobly/suite_runner.py line 185 at r1 (raw file):

    if len(stacks) < 2:
      logging.debug(
          f'Failed to get the caller stack of run_suite_class. Got stacks: %s',

Nit: this is not a f-string

Code quote:

f

Copy link
Collaborator Author

@mhaoli mhaoli left a comment

Choose a reason for hiding this comment

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

Reviewable status: 2 of 3 files reviewed, all discussions resolved (waiting on @xianyuanjia and @xpconanfan)


mobly/suite_runner.py line 185 at r1 (raw file):

Previously, xianyuanjia wrote…

Nit: this is not a f-string

Thanks. DONE.

Copy link
Collaborator

@xianyuanjia xianyuanjia left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewable status: 1 of 3 files reviewed, all discussions resolved (waiting on @xpconanfan)

@mhaoli mhaoli merged commit 130f6d9 into google:master Dec 13, 2024
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants