tests/testthat/test-enw_fit_opts.R

test_that("enw_fit_opts produces the expected output", {
  expect_snapshot(enw_fit_opts(sampler = NULL, adapt_delta = 0.9))
  expect_identical(enw_fit_opts(pp = TRUE, nowcast = FALSE)$data$cast, 1)
  expect_identical(
    enw_fit_opts(
      likelihood_aggregation = "groups"
    )$data$likelihood_aggregation, 1
  )
  expect_identical(
    enw_fit_opts(
      likelihood_aggregation = "groups",
      threads_per_chain = 2
    )$data$parallelise_likelihood, 1L
  )
})
epiforecasts/epinowcast documentation built on Feb. 3, 2025, 4:17 p.m.