tests/testthat/test-measure_diffusion.R

test <- play_diffusion(create_tree(12), steps = 2)

test_that("infection total works", {
  expect_values(net_infection_total(test), 0.583)
})

test_that("infection complete works", {
  expect_values(net_infection_complete(test), Inf)
})

Try the manynet package in your browser

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

manynet documentation built on June 23, 2025, 9:07 a.m.