Skip to content

Commit

Permalink
Merge pull request #85 from poissonconsulting/b-test-failure
Browse files Browse the repository at this point in the history
Remove flaky part of test on timing of memoized version of `log_lik_beta_binom()`.
  • Loading branch information
nehill197 authored Jan 13, 2025
2 parents b7b7866 + c37ce7a commit 542d0ff
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions tests/testthat/test-log-lik.R
Original file line number Diff line number Diff line change
Expand Up @@ -207,15 +207,6 @@ test_that("beta_binom memoized function gives same outputs as non-memoized funct
log_lik_beta_binom(1:100, 200, 0.1, 0, memoize = FALSE),
log_lik_beta_binom(1:100, 200, 0.1, 0, memoize = TRUE)
)
withr::with_seed(
101,
{
x <- ran_beta_binom(1e7, 10, 0.5, 0.1)
}
)
time_no_mem <- system.time(log_lik_beta_binom(x, 10, 0.5, 0.2, memoize = FALSE))[3]
time_mem <- system.time(log_lik_beta_binom(x, 10, 0.5, 0.2, memoize = TRUE))[3]
expect_true(time_mem < time_no_mem)
})

test_that("beta_binom vectorized", {
Expand Down

0 comments on commit 542d0ff

Please sign in to comment.