Skip to content

Commit

Permalink
- Skip tests that use memoize if not installed
Browse files Browse the repository at this point in the history
  • Loading branch information
nehill197 committed Jan 7, 2025
1 parent cdd5d9b commit ba12eea
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/testthat/test-log-lik.R
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ test_that("beta_binom known values", {
})

test_that("beta binomial deviance function is memoized", {
skip_if_not_installed("memoise")
expect_true(memoise::is.memoized(lgamma_size_x))
})

Expand All @@ -197,6 +198,7 @@ test_that("lgamma_size_x produces expected outputs", {
})

test_that("beta_binom memoized function gives same outputs as non-memoized function", {
skip_if_not_installed("memoise")
expect_equal(
log_lik_beta_binom(1:100, 200, 0.5, 0.1, memoize = FALSE),
log_lik_beta_binom(1:100, 200, 0.5, 0.1, memoize = TRUE)
Expand Down

0 comments on commit ba12eea

Please sign in to comment.