tests/testthat/test-environment.R

test_that(".pkgEnv functions work", {
  test1 <- 1L:10L

  assign("test1", test1, envir = SpaDES.core:::.pkgEnv)
  expect_true(exists("test1", envir = SpaDES.core:::.pkgEnv))
  expect_equal(test1, get("test1", envir = SpaDES.core:::.pkgEnv))
})

Try the SpaDES.core package in your browser

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

SpaDES.core documentation built on Sept. 9, 2025, 5:40 p.m.