-
Notifications
You must be signed in to change notification settings - Fork 341
Closed
Description
This is a continuation of #2083.
I created a simple reproducible R package example to illustrate the issue: https://github.com/lawalter/testingtestthat
To summarize, testthat::test_local(paste0(here::here())) passes no matter what subfolders are named under ~/tests/testthat/data/. However, R cmd check fails to access data if and only if the ~/tests/testthat/data/ subfolder is named "hold" (i.e., testthat::test_path("data", "DL0902", "hold"); subfolder "permit" and "holdz" work fine).
Example test-ignoreHolds.R:
test_that("ignoreHolds works", {
hold_file <-
list.files(testthat::test_path("data", "DL0902", "hold"),
full.names = T)
test_hold_file <-
listFiles(testthat::test_path("data", "DL0902", "hold"))
expect_identical(hold_file, test_hold_file[[1]])
expect_true(length(hold_file) == 1)
expect_true(length(test_hold_file[[1]]) == 1)
})

Metadata
Metadata
Assignees
Labels
No labels