tests/testthat/test_strip_srcrefs.R

test_that("remove srcref from function", {
  f = function(x) NULL
  attr(f, "srcref") = "mock_srcrefs"
  f_strip = strip_srcrefs(f)
  expect_true(is.null(attr(f_strip, "srcref")))
})
mlr-org/mlr3misc documentation built on April 28, 2024, 11 p.m.