tests/testthat/test_TaskClassif.R

test_that("autoplot.TaskClassif", {
  task = mlr3::tsk("iris")

  p = autoplot(task, type = "target")
  expect_true(is.ggplot(p))
  vdiffr::expect_doppelganger("taskclassif_target", p)

  p = autoplot(task, type = "pairs")
  expect_s3_class(p, "ggmatrix")
  vdiffr::expect_doppelganger("taskclassif_pairs", p)

  p = autoplot(task, type = "duo")
  expect_s3_class(p, "ggmatrix")
  vdiffr::expect_doppelganger("taskclassif_duo", p)
})
mlr-org/mlr3viz documentation built on Oct. 19, 2021, 1:10 p.m.