-
Notifications
You must be signed in to change notification settings - Fork 764
Fix test_coverage_active_file() for testthat 3.3 #2631
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
Fix test_coverage_active_file() for testthat 3.3 #2631
Conversation
Name `snap_dir` arg for `testthat::local_snapshotter()` in `test_coverage_active_file()` Fixes r-lib#2630
|
It's a little ironic for this not to have test coverage, but the tests here are pretty light, and it's tricky to add them. I could probably get some things in place to at least throw errors if something like this happens again if you'd like. |
|
Thank you. This has been annoying me for the past weeks. I got a local quickfix. Is there a chance to get this into the dev version quickly? |
|
Hmmm, I haven't noticed this because I haven't updated devtools for a long time 😬 |
|
Let me also fix this in testthat, since I'm about to release it. We'll still want this change because it's definitely better practice to use a named argument here. |
jennybc
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.
This is sort of nitpicky/meta but sort of legit and I know you are resilient enough @jonthegeek to take it 😁 but can you back out the Air-ish formatting changes, so this only has the meaningful change? I think it's just the addition of snap_dir =?
(I need to do a holistic re-formatting of devtools as a whole. And it really does make it easier to see what's in this PR / what the problem is.)
I almost did this earlier today because I didn't intentionally make them (air and/or "Strip trailing horizontal whitespace when saving" did). It's a little tricky to save WITHOUT applying those things but I can work it out! |
Hmmm, does that mean you've configured Air formatting on save at the user level? That's kind of anti-recommended, even though it's tempting. https://posit-dev.github.io/air/editor-vscode.html#user-vs-workspace-settings
In any case, thanks for the fixup! (devtools is about to get Air formatted in a separate PR.) |
I still use RStudio most of the time, and at least some of that was happening via old-school settings... although now that I look at it it looks like I do always apply air. I'll take a look and see what makes sense to reconfigure! Edit: Oh ok, Rstudio only supports "always on." I think I'm mostly just waiting for posit-dev/positron#1778 before I can switch without too-frequent frustration. |
Name
snap_dirarg fortestthat::local_snapshotter()intest_coverage_active_file()Fixes #2630