tests/testthat/test_LearnerClassifCVGlmnet.R

skip_on_os("solaris")
skip_if_not_installed("mlr3learners")
skip_if_not_installed("glmnet")
skip_if_not_installed("ggfortify")
set.seed(42)

test_that("autoplot.LearnerClassifCVGlmnet", {
  requireNamespace("mlr3learners")
  learner = mlr3::lrn("classif.cv_glmnet")$train(mlr3::tsk("wine"))
  p = autoplot(learner)
  expect_true(is.ggplot(p))
  vdiffr::expect_doppelganger("learner_classif.cv_glmnet", p)
})
mlr-org/mlr3viz documentation built on Oct. 19, 2021, 1:10 p.m.