-
Notifications
You must be signed in to change notification settings - Fork 89
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
workshop protected arguments warning #1216
Conversation
tests/testthat/test-arguments.R
Outdated
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.
Note that this is a totally new test file. This warning is tested in a couple engine-specific files already—I just test for the subclass now.
@@ -32,25 +32,6 @@ | |||
x Engine "wat?" is not supported for `mlp()` | |||
i See `show_engines("mlp")`. | |||
|
|||
--- |
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.
Each of these removed snapshots both tested duplicates of the print method and this warning message.
I imagine this will cause snap changes in many places in extratests and parsnip extensions. Those should be able to just test the warning class now.😜 |
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.
Generally totally on board with this but hitting "request changes" to make that part obvious. I'm inclined to say that we should add a test that such a protected argument does indeed get protected, not just that it warns. What do you think?
Happy for you to merge after that's fixed 👍
This pull request has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue. |
I came across this warning while spring cleaning bonsai and felt that it was reasonable that we tested for it but not that we screenshotted it. This PR adds a warning subclass and corrects pluralization in the message.