test: microgen - _should_include_class() and _should_include_method()#2321
Merged
chalmerlowe merged 4 commits intoautogenfrom Oct 15, 2025
Merged
test: microgen - _should_include_class() and _should_include_method()#2321chalmerlowe merged 4 commits intoautogenfrom
_should_include_class() and _should_include_method()#2321chalmerlowe merged 4 commits intoautogenfrom
Conversation
Linchin
reviewed
Oct 14, 2025
| Args: | ||
| class_name: The name of the class to check. | ||
| class_filters: A dictionary containing filter rules: | ||
| "include_suffixes": List of suffixes. If provided, the class name |
Contributor
There was a problem hiding this comment.
Just for my curiosity, what happens if a class name satisfies both include_suffixes and exclude_suffixes?
Linchin
approved these changes
Oct 14, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces unit tests for the
_should_include_class()and_should_include_method()filter functions ingenerate.py.These tests ensure the filtering logic behaves as expected ensuring the microgenerator's ability to selectively process classes and methods.
Key changes include:
tests/unit/test_generate_filters.py.include/excludescenarios for class suffixes and method prefixes.@pytest.mark.parametrizewithpytest.param()andidto create the test cases.generate.pyfor the tested functions, including examples.