tests/testthat/test-my_rf_cv.R

data("my_iris")
data("my_gapminder")
test_that("my_rf_cv works properly", {
  expect_is(my_rf_cv(k = 5), "numeric")
  expect_is(my_rf_cv(k = 2), "numeric")
})

test_that("my_rf_cv breaks", {
  expect_error(my_rf_cv())
  expect_error(my_rf_cv(my_iris))
})
SimonaLiao/Stat302Package documentation built on March 23, 2020, 9:56 p.m.