Skip to content

Commit

Permalink
Check the error message in detail.
Browse files Browse the repository at this point in the history
  • Loading branch information
fweber144 committed Apr 20, 2022
1 parent dbf492f commit 4c2fb3c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/testthat/setup.R
Original file line number Diff line number Diff line change
Expand Up @@ -799,6 +799,15 @@ if (run_cvvs) {
}
}))
success_cvvs <- !sapply(cvvss, inherits, "try-error")
err_ok <- sapply(cvvss[!success_cvvs], function(cvvs_err) {
attr(cvvs_err, "condition")$message ==
"Not enough (non-NA) data to do anything meaningful"
})
expect_true(
all(err_ok),
info = paste("Unexpected error for",
paste(names(cvvss[!success_cvvs])[!err_ok], collapse = ", "))
)
cvvss <- cvvss[success_cvvs]
args_cvvs <- args_cvvs[success_cvvs]
}
Expand Down

0 comments on commit 4c2fb3c

Please sign in to comment.