Repository navigation
Fix test helper discovery in pytest and sanitizer runner #446
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -45,7 +45,7 @@ | |
| (module_name, name) | ||
| for module_name in [os.path.splitext(f)[0] for f in files if f not in exclude_files] | ||
| for name, obj in inspect.getmembers(importlib.import_module(module_name)) | ||
| if inspect.isfunction(obj) and name.startswith('test') and 'test_filter' not in name | ||
| if inspect.isfunction(obj) and name.startswith('test') and getattr(obj, '__test__', True) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔵 suggestion: With default discovery, the new 🤖 v5
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The whole test has been removed. |
||
| ] | ||
| tools = [x.strip() for x in args.tools.split(',')] | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔵 suggestion: Consider adding a one-line comment explaining why
test_filter.__test__ = Falseis set (pytest /test_sanitizer.pyopt-out marker for atest-prefixed helper). Future readers may otherwise be tempted to remove what looks like a stray attribute assignment.🤖 v5