tests/testthat/test-doctest-onetime_been_done.R

# Generated by doctest: do not edit by hand
# Please edit file in R/utils.R

test_that("Doctest: onetime_been_done", {
  # Created from @doctest for `onetime_been_done`
  # Source file: R/utils.R
  # Source line: 90
  oo <- options(onetime.dir = tempdir(check = TRUE))
  id <- sample(10000L, 1)
  expect_false(onetime_been_done(id = id))
  onetime_message("Creating an ID", id = id)
  expect_true(onetime_been_done(id = id))
  onetime_reset(id = id)
  options(oo)
})

Try the onetime package in your browser

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

onetime documentation built on Sept. 3, 2023, 9:06 a.m.