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)

Try the landscapemetrics package in your browser

Any scripts or data that you put into this service are public.

landscapemetrics documentation built on Oct. 3, 2023, 5:06 p.m.