-
-
Notifications
You must be signed in to change notification settings - Fork 409
docs: plugin tests & minor improvement #2067
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
Conversation
dgw
left a comment
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.
I love these additions! Did my usual thing, on mobile though (so not a great view of indentation or line length). Adjust suggestions as needed to wrap properly, etc.
Thanks! Will fix that tomorrow. |
dgw
left a comment
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.
Is that it? Are we done after just these two last nitpicks, or is Exi going to dump another 500 lines on me in a few days? 😁
Thanks to my editor! <3 Co-authored-by: dgw <[email protected]>
Co-authored-by: dgw <[email protected]>
Yeah. I feel like I could write documentation for the Trigger factory, but I realized that it's almost an internal tool made to test some very specific part of Sopel's code. So I think I won't add (at least for now) a full-length explanation about it, and just leave the reader with the current docstrings, and having to look at our test suite. That's good enough for me! |
dgw
left a comment
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.
![]()
Description
After discussing #2065 it appears that "how to test a plugin" isn't well documented, so here is a PR for that.
I think there are more that can be written, in particular about factories and how to use them.
I also added a convenient method to clear
backend.message_sent, so you don't have to do it manually. It's useful when you have a bunch of automated messages, or when you don't want to write more than one test method for different yet very similar use cases (for example: trigger by a regular user vs admin vs owner).Checklist
make qa(runsmake qualityandmake test)