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_null(attr(f_strip, "srcref"))
})
mlr-org/mlr3misc documentation built on June 12, 2025, 9:54 p.m.