Skip to content

Commit

Permalink
Test for non-oceanic should yield -Inf (NA) for Galapagos for nonzero…
Browse files Browse the repository at this point in the history
… colonization rate
  • Loading branch information
rsetienne committed Jun 24, 2024
1 parent 7cce2fe commit 3467dad
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/testthat/test-integration_DAISIE.R
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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"),
Expand Down

0 comments on commit 3467dad

Please sign in to comment.