tests/testthat/test_package_load.R

test_that("loaded packages", {
  loaded <- names(sessionInfo()$otherPkgs)
  expect_true(
    all(tidymodels:::core %in% loaded)
  )
})


test_that("should not be loaded", {
  loaded <- names(sessionInfo()$otherPkgs)
  expect_true(
    all(!(c("rlang", "tidyselect") %in% loaded))
  )
})

Try the tidymodels package in your browser

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

tidymodels documentation built on May 29, 2024, 11:26 a.m.