From 3467dadeaa0c1ee2dd9c49e2f817a93fbf8cebf5 Mon Sep 17 00:00:00 2001 From: rsetienne Date: Mon, 24 Jun 2024 16:24:34 +0200 Subject: [PATCH] Test for non-oceanic should yield -Inf (NA) for Galapagos for nonzero colonization rate --- tests/testthat/test-integration_DAISIE.R | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/testthat/test-integration_DAISIE.R b/tests/testthat/test-integration_DAISIE.R index eb6d7306..425744f3 100644 --- a/tests/testthat/test-integration_DAISIE.R +++ b/tests/testthat/test-integration_DAISIE.R @@ -231,8 +231,8 @@ test_that("DAISIE_ML with nonzero probability of initial presence gives testthat::expect_false(isTRUE(all.equal(tested_mle_zero, tested_mle_nonzero))) }) -test_that("DAISIE_ML gives a nonzero likelhood when probability of initial - presence is nonzero and colonization rate equals 0", { +test_that("DAISIE_ML gives a -Inf loglikelhood when probability of initial + presence is nonzero and colonization rate equals 0 for Galapagos", { skip_if(Sys.getenv("CI") == "" && !(Sys.getenv("USERNAME") == "rampa"), message = "Run only on CI") skip_on_cran() @@ -246,9 +246,10 @@ test_that("DAISIE_ML gives a nonzero likelhood when probability of initial parsfix = NULL, idparsfix = NULL ) - testthat::expect_true(tested_mle$loglik > -Inf) + testthat::expect_true(is.na(tested_mle$loglik)) }) + test_that("DAISIE_ML simple case works with estimating probability of initial presence", { skip_if(Sys.getenv("CI") == "" && !(Sys.getenv("USERNAME") == "rampa"),