-
Notifications
You must be signed in to change notification settings - Fork 24k
Add testing helpers to extract warnings and deprecations from module results #85327
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: devel
Are you sure you want to change the base?
Conversation
The test
|
I'm not sure how that mypy error relates to my change. It rather seems to be a bug in the mypy test runner (test/sanity/code-smell/mypy.py). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
The mypy error was due to missing annotations, which I added in #85329. I'm not sure why that error didn't show up earlier. |
@mattclay thanks! |
@mattclay @nitzmahone while this is marked as a "feature", I think it should be part of ansible-core 2.19, since the internal objects that are required to correctly parse warnings and deprecation messages are being introduced in 2.19. |
SUMMARY
Right now I have to use hacks like https://github.com/ansible-collections/community.internal_test_tools/blob/577f37c5402e0e0c352f9841ac582bd94ae7457a/tests/unit/plugins/modules/utils.py#L95-L114 to extract the warning messages, and this can break any time when internals of ansible-core change.
Ref: #85181 (comment)
ISSUE TYPE