fix: Ensure that testthat::skip() is only called in RSQLite's own tests, never in the tests for other packages - #516
Conversation
and remove it when tests are complete
it isn't on CRAN or in the suggests list
Current Aviator status
This PR was merged manually (without Aviator). Merging manually can negatively impact the performance of the queue. Consider using Aviator next time.
See the real-time status of this PR on the
Aviator webapp.
Use the Aviator Chrome Extension
to see the status of your PR within GitHub.
|
krlmlr
left a comment
There was a problem hiding this comment.
Thanks, good start. Would you like to add the rest of the implementation to this PR?
For the next steps: Inside if (), && is always better than & .
| import(DBI) | ||
| import(methods) | ||
| import(rlang) | ||
| importFrom(DBI,Id) |
There was a problem hiding this comment.
Interesting, where does this come from?
There was a problem hiding this comment.
I ran a CMD check after making my changes out of habit and it showed up on devtools::document(). figured I'd go ahead and commit it
There was a problem hiding this comment.
Note to self: this should have happened automatically, but hasn't due to "The decor package(s) are required for this functionality": https://github.com/r-dbi/RSQLite/actions/runs/9949313875/job/27485358644#step:11:75 .
This reverts commit 1a4045a.
Co-authored-by: Kirill Müller <krlmlr@users.noreply.github.com>
As discussed in #515, the rest of the changes have to go into |
krlmlr
left a comment
There was a problem hiding this comment.
Thanks. Happy to review everything we want to do here as a single PR here, I can easily move to dm then.
| import(DBI) | ||
| import(methods) | ||
| import(rlang) | ||
| importFrom(DBI,Id) |
There was a problem hiding this comment.
Note to self: this should have happened automatically, but hasn't due to "The decor package(s) are required for this functionality": https://github.com/r-dbi/RSQLite/actions/runs/9949313875/job/27485358644#step:11:75 .
also fix the formatting of the message
krlmlr
left a comment
There was a problem hiding this comment.
Thanks! Can you please also update the header of the standalone file to include the changes and the new dependency?
|
not sure why that test is failing, seems unrelated? here's the relevant log output: |
krlmlr
left a comment
There was a problem hiding this comment.
Thanks for the updates and for your patience. Should we do one more round?
There's a "Changelog" section in the header that could use a bullet.
This particular test is flaky, I need to review it at some point.
| # Skip if some packages are not installed when testing | ||
| # And say which package was not installed. | ||
| if (identical(Sys.getenv("TESTTHAT"), "true")) { | ||
| if (identical(Sys.getenv("TESTTHAT"), "true") && identical(getOption("test_package_name"), getPackageName())) { |
There was a problem hiding this comment.
This is nice, but would have to be methods::getPackageName() (why is this not flagged?), and that function does too much too.
Essentially, methods::getPackageName() calls environmentName(topenv()), that looks better to me than my initial proposal.
|
No worries. I'll work that in at some point today. One thing to note - I removed the hms package and ran the tests locally, but a bunch failed. I'm not sure how far this particular bit of code is supposed to go in terms of skipping tests, but all the failures were from |
testthat::skip() is only called in RSQLite's own tests, never in the tests for other packages
|
Thanks for pushing through! I don't understand why removing hms fails the tests because this package is really only used with specific |
Fixes #515
setup.Rto set package_name option and unset it after test are rundbConnectfrom list of packages to check (AFAICT it doesn't exist anymore)remaining tasks for #515
&to the conditional withgetOptions("package_name") == "RSQLite"glue