tests/testthat/helper-data_dependency.R

#' If this runs in a situation without data, then skip these tests.
test_requires_data <- function() {
    testthat::skip_if_not(
        tryCatch({
            dir.exists(
                rampdata::as.path(
                    rampdata::ramp_path("/globalrc/inputs/PfPR_medians")))
        },
        error = function(x) {
            FALSE
        }
    ))
}
dd-harp/globalrc documentation built on Sept. 20, 2021, 12:31 a.m.