Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Simon P. Couch <[email protected]>
  • Loading branch information
hfrick and simonpcouch authored Sep 19, 2024
1 parent 000c385 commit 6a5e519
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
12 changes: 6 additions & 6 deletions tests/testthat/test-bootci.R
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,12 @@ test_that(
"Sufficient replications needed to sufficiently reduce Monte Carlo sampling Error for BCa method",
{
set.seed(456765)
bt_small <-
bootstraps(dat, times = 10, apparent = TRUE) %>%
dplyr::mutate(
stats = purrr::map(splits, ~ get_stats(.x)),
junk = 1:11
)
bt_small <-
bootstraps(dat, times = 10, apparent = TRUE) %>%
dplyr::mutate(
stats = purrr::map(splits, ~ get_stats(.x)),
junk = 1:11
)

expect_snapshot(int_pctl(bt_small, stats))
expect_snapshot(int_t(bt_small, stats))
Expand Down
2 changes: 2 additions & 0 deletions tests/testthat/test-rolling_origin.R
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,11 @@ test_that("lag", {
skip_if_not_installed("modeldata")
data("drinks", package = "modeldata", envir = rlang::current_env())
expect_snapshot(error = TRUE, {
# lag must be less than the number of training observations
rolling_origin(drinks, initial = 5, lag = 6)
})
expect_snapshot(error = TRUE, {
# lag must be a whole number
rolling_origin(drinks, lag = 2.1)
})
})
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-rset.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ test_that("bad args", {
car_folds$id,
attrib = args
)
})
})
})

test_that("rset with attributes", {
Expand Down

0 comments on commit 6a5e519

Please sign in to comment.