inst/tinytest/test_wipe_clean.R

if (interactive()) {
  pkgload::load_all()
  library("tinytest")
}


e <- new.env()
assign("a", 1, envir = e)
expect_identical(ls(envir = e), "a")
result <- wipe_clean(envir = e)
expectation <- "a"
expect_identical(result, expectation)
expect_identical(length(ls(envir = e)), 0L)

Try the fritools2 package in your browser

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

fritools2 documentation built on July 9, 2023, 7:07 p.m.