Skip to content

Commit

Permalink
fix some tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mattansb committed Jul 30, 2023
1 parent fecdef4 commit 162d325
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 0 additions & 2 deletions tests/testthat/test-bayesfactor_models.R
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,6 @@ test_that("bayesfactor_models BRMS", {
skip_on_cran()
skip_on_ci()

skip_if_not_or_load_if_installed("lme4")
skip_if_not_or_load_if_installed("rstanarm")
skip_if_not_or_load_if_installed("bridgesampling")
skip_if_not_or_load_if_installed("brms")

Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test-format.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ test_that("p_significance", {
)
expect_equal(
format(p_direction(x)),
data.frame(x = "0.51", stringsAsFactors = FALSE),
data.frame(x = "51.00%", stringsAsFactors = FALSE),
ignore_attr = TRUE
)
expect_equal(
format(p_map(x)),
data.frame(x = "0.97", stringsAsFactors = FALSE),
data.frame(x = "0.973", stringsAsFactors = FALSE),
ignore_attr = TRUE
)
expect_equal(
Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test-p_map.R
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@ test_that("p_map", {

test_that("p_map | null", {
x <- distribution_normal(4000, mean = 1)
expect_equal(p_map(x), 0.6194317, ignore_attr = TRUE, tolerance = 0.01)
expect_equal(p_map(x, null = 1), 1, ignore_attr = TRUE, tolerance = 0.01)
expect_equal(as.numeric(p_map(x)), 0.6194317, ignore_attr = TRUE, tolerance = 0.01)
expect_equal(as.numeric(p_map(x, null = 1)), 1, ignore_attr = TRUE, tolerance = 0.01)
})

0 comments on commit 162d325

Please sign in to comment.