tests/testthat/test-options.R

context("test-options.R -- default options")

test_that("sl3 options work as expected", {
  sl3:::.onLoad()
  sl3:::.onAttach()

  sl3Options()
  sl3Options("sl3.verbose")
  expect_error(sl3Options("blahblah"))
  expect_error(sl3Options("blahblah", 5))

  sl3Options("sl3.verbose", TRUE)
  sl3Options("sl3.verbose")
  sl3Options("sl3.verbose", FALSE)
})
tlverse/sl3 documentation built on Nov. 18, 2024, 12:46 a.m.