tests/testthat/test-package.R

test_that("pkg_ls() respects exclude", {
  skip_if_not(getRversion() >= "3.6")

  library(callr)
  expect_true("r" %in% pkg_ls("callr"))
  pkgload::unload("callr")

  library(callr, exclude = "r")
  expect_false("r" %in% pkg_ls("callr"))
  pkgload::unload("callr")
})

Try the conflicted package in your browser

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

conflicted documentation built on Feb. 16, 2023, 6:05 p.m.