dragosmg commented on a change in pull request #12486:
URL: https://github.com/apache/arrow/pull/12486#discussion_r812424612
##########
File path: r/tests/testthat/test-duckdb.R
##########
@@ -15,6 +15,19 @@
# specific language governing permissions and limitations
# under the License.
+test_that("meaningful error message when duckdb is not installed", {
+ new_lib <- tempfile()
+ dir.create(new_lib)
+ withr::with_libpaths(new_lib, {
+ ds <- InMemoryDataset$create(example_data)
+ expect_error(
+ to_duckdb(ds),
+ "Please install the `duckdb` package."
+ )
+ })
+ unlink(new_lib, recursive = TRUE)
Review comment:
I think the question might be how to make sure there's only one `dir` on
`.libPaths()` for the purpose of running that test. I believe {rent} might be
doing just that.
https://github.com/rstudio/renv/blob/86edb40cf638c017f26c7f9be155bbbbaf01b1b0/R/libpaths.R#L12-L13
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]