Skip to content

sync main -> dev #396

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/testthat/_snaps/dist_quantiles.md
Original file line number Diff line number Diff line change
@@ -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].
Expand Down
8 changes: 0 additions & 8 deletions tests/testthat/_snaps/layer_predict.md

This file was deleted.

2 changes: 1 addition & 1 deletion tests/testthat/test-dist_quantiles.R
Original file line number Diff line number Diff line change
@@ -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))
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-layer_predict.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading