tests/testthat/test-options-landscapemetrics.R

test_that("option parameters work", {

    options(to_disk = TRUE)

    patches <- get_patches(landscape)

    expect_true(object = getOption("to_disk"))
    expect_false(object = all(vapply(patches[[1]], terra::inMemory, FUN.VALUE = logical(1))))
})

options(to_disk = NULL)
landscapeecology/landscapemetrics documentation built on April 7, 2024, 11:11 p.m.