tests/testthat/test-decision_tree-tunable.R

test_that("tunable parameters for decision_tree + rpart", {
  expect_snapshot(
    display_tunable_call_info(
      decision_tree() |> set_engine("rpart")
    )
  )
})

test_that("tunable parameters for decision_tree + C5.0", {
  expect_snapshot(
    display_tunable_call_info(
      decision_tree() |> set_engine("C5.0")
    )
  )
})

test_that("tunable parameters for decision_tree + spark", {
  expect_snapshot(
    display_tunable_call_info(
      decision_tree() |> set_engine("spark")
    )
  )
})

test_that("tunable parameters for decision_tree + partykit", {
  expect_snapshot(
    display_tunable_call_info(
      decision_tree() |> set_engine("partykit")
    )
  )
})

Try the parsnip package in your browser

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

parsnip documentation built on May 14, 2026, 5:08 p.m.