diff --git a/tests/testthat/_snaps/dist_quantiles.md b/tests/testthat/_snaps/dist_quantiles.md index da7e50100..1d626e089 100644 --- a/tests/testthat/_snaps/dist_quantiles.md +++ b/tests/testthat/_snaps/dist_quantiles.md @@ -1,7 +1,7 @@ # constructor returns reasonable quantiles Code - new_quantiles(rnorm(5), rnorm(5)) + new_quantiles(rnorm(5), c(-2, -1, 0, 1, 2)) Condition Error in `new_quantiles()`: ! `quantile_levels` must lie in [0, 1]. diff --git a/tests/testthat/_snaps/layer_predict.md b/tests/testthat/_snaps/layer_predict.md deleted file mode 100644 index 5c353eb4c..000000000 --- a/tests/testthat/_snaps/layer_predict.md +++ /dev/null @@ -1,8 +0,0 @@ -# layer_predict dots validation - - Code - predict(wf_bad_arg, latest) - Condition - Error: - ! argument "..3" is missing, with no default - diff --git a/tests/testthat/test-dist_quantiles.R b/tests/testthat/test-dist_quantiles.R index 8112326dc..66f229956 100644 --- a/tests/testthat/test-dist_quantiles.R +++ b/tests/testthat/test-dist_quantiles.R @@ -1,7 +1,7 @@ library(distributional) test_that("constructor returns reasonable quantiles", { - expect_snapshot(error = TRUE, new_quantiles(rnorm(5), rnorm(5))) + expect_snapshot(error = TRUE, new_quantiles(rnorm(5), c(-2, -1, 0, 1, 2))) expect_silent(new_quantiles(sort(rnorm(5)), sort(runif(5)))) expect_snapshot(error = TRUE, new_quantiles(sort(rnorm(5)), sort(runif(2)))) expect_silent(new_quantiles(1:5, 1:5 / 10)) diff --git a/tests/testthat/test-layer_predict.R b/tests/testthat/test-layer_predict.R index 70e76e593..041516b29 100644 --- a/tests/testthat/test-layer_predict.R +++ b/tests/testthat/test-layer_predict.R @@ -48,7 +48,7 @@ test_that("layer_predict dots validation", { # We don't detect completely-bogus arg names until predict time: expect_no_error(f_bad_arg <- frosting() %>% layer_predict(bogus_argument = "something")) wf_bad_arg <- wf %>% add_frosting(f_bad_arg) - expect_snapshot(error = TRUE, predict(wf_bad_arg, latest)) + expect_error(predict(wf_bad_arg, latest)) # ^ (currently with a awful error message, due to an extra comma in parsnip::check_pred_type_dots) # Some argument names only apply for some prediction `type`s; we don't check