tests/testthat/test_expectations.R

test_that("expecations do not use globals", {
  skip_if_not_installed("codetools")

  ee = new.env()
  path = system.file(file.path("testthat", "helper_expectations.R"), package = "mlr3")
  sys.source(path, envir = ee)

  testthat::expect_silent(codetools::checkUsageEnv(ee))
})

Try the mlr3 package in your browser

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

mlr3 documentation built on Sept. 11, 2024, 6:55 p.m.