tests/testthat/test-misc.R

test_that("data conversion", {
  skip_if(!interactive())
  h2o_start()

  expect_silent(cars_1 <- as_h2o(mtcars))
  expect_equal(class(cars_1$data), "H2OFrame")
  expect_equal(class(cars_1$id), "character")
  expect_equal(as_tibble(cars_1$data), tibble::as_tibble(mtcars))
})


test_that("server functions", {
  # skip("h2o server issues with testthat")
  skip_if(!interactive())

  expect_silent(agua::h2o_start())
  expect_true(h2o_running())
  h2o::h2o.shutdown(prompt = FALSE)
  expect_false(h2o_running())
})

Try the agua package in your browser

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

agua documentation built on June 7, 2023, 5:07 p.m.