tests/testthat/test-toy.R

test_that("Can enumerate toy examples", {
  all_toys <- toy_example()
  expect_type(all_toys, "character")
  expect_true(all(file.exists(all_toys)))

  some_toys <- toy_example(names(all_toys)[1:3])
  expect_equal(length(some_toys), 3L)

  expect_error(file.exists(toy_example("nonexisting-toy")))
})

Try the mlfit package in your browser

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

mlfit documentation built on Oct. 8, 2021, 9:09 a.m.