attic/testthat/test_base_checkOpenMLFlowForExistence.R

context("checkOpenMLFlowForExistence")

test_that("checkOpenMLFlowForExistence", {
  lrn = makeLearner("classif.rpart")
  flow = createOpenMLImplementationForMlrLearner(lrn)
  check = checkOpenMLFlowForExistence(flow)
  expect_is(check, "list")
  expect_true(check$exists)
  expect_is(check$id, "integer")
  
  flow$name = "imaginary_non-existent_flow"
  check = checkOpenMLFlowForExistence(flow)
  expect_is(check, "list")
  expect_false(check$exists)
  expect_is(check$id, "integer")
})
openml/r documentation built on Oct. 21, 2022, 2:21 a.m.