Skip to content

fix: deduplicate discovered subclasses - #1042

Closed
Shubham-Padkonde wants to merge 1 commit into
google:masterfrom
Shubham-Padkonde:fix/unique-discovered-subclasses
Closed

Shubham-Padkonde wants to merge 1 commit into
google:masterfrom
Shubham-Padkonde:fix/unique-discovered-subclasses

Conversation

@Shubham-Padkonde

Copy link
Copy Markdown

Subclass discovery can return the same class multiple times when a module aliases it or when it matches more than one requested base class. As a result, find_subclass_in_module can reject a module containing only one distinct test class.

Return each matching class once, preserve discovery order, and stop checking bases after a match. Regressions cover aliases and overlapping/repeated bases; existing tests retain coverage for genuinely different subclasses.

Validation: both regressions fail before the fix; 55 utility tests pass and four platform-specific tests skip afterward. Pyink and git diff --check pass.

@xpconanfan

xpconanfan commented Oct 1, 2026 •

Copy link
Copy Markdown
Collaborator

Closing this PR. We do not accept AI-generated PRs targeting synthetic edge cases.

@xpconanfan xpconanfan closed this Oct 1, 2026
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