Skip to content

Commit

Permalink
Merge pull request #109 from MichaelChirico/patch-1
Browse files Browse the repository at this point in the history
Skip tests depending on Suggests packages
  • Loading branch information
mitchelloharawild authored Jul 31, 2024
2 parents dd5332b + e245296 commit 400ad57
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/testthat/test-apply.R
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ test_that("Recycling rules and output for applying multiple inputs over multiple
)
)

skip_if_not_installed("mvtnorm")
expect_equal(
density(dist, cbind(2, 3)),
c(0.046649277604197, 0.0215708514518913)
Expand Down
1 change: 1 addition & 0 deletions tests/testthat/test-transformations.R
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ test_that("inverses are applied automatically", {
expect_equal(density(dist * 2 / 2, 0.5), density(dist, 0.5))

# inverting a gamma distribution
skip_if_not_installed("actuar")
expect_equal(density(1/dist_gamma(4, 3), 0.5), density(dist_inverse_gamma(4, 1/3), 0.5))
expect_equal(density(1/(1/dist_gamma(4, 3)), 0.5), density(dist_gamma(4, 3), 0.5))

Expand Down

0 comments on commit 400ad57

Please sign in to comment.