Skip to content

Commit 3f174fc

Browse files
authored
Merge pull request #396 from cmu-delphi/main
sync main -> dev
2 parents aa41827 + b4fa6e6 commit 3f174fc

File tree

4 files changed

+3
-11
lines changed

4 files changed

+3
-11
lines changed

tests/testthat/_snaps/dist_quantiles.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# constructor returns reasonable quantiles
22

33
Code
4-
new_quantiles(rnorm(5), rnorm(5))
4+
new_quantiles(rnorm(5), c(-2, -1, 0, 1, 2))
55
Condition
66
Error in `new_quantiles()`:
77
! `quantile_levels` must lie in [0, 1].

tests/testthat/_snaps/layer_predict.md

-8
This file was deleted.

tests/testthat/test-dist_quantiles.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
library(distributional)
22

33
test_that("constructor returns reasonable quantiles", {
4-
expect_snapshot(error = TRUE, new_quantiles(rnorm(5), rnorm(5)))
4+
expect_snapshot(error = TRUE, new_quantiles(rnorm(5), c(-2, -1, 0, 1, 2)))
55
expect_silent(new_quantiles(sort(rnorm(5)), sort(runif(5))))
66
expect_snapshot(error = TRUE, new_quantiles(sort(rnorm(5)), sort(runif(2))))
77
expect_silent(new_quantiles(1:5, 1:5 / 10))

tests/testthat/test-layer_predict.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ test_that("layer_predict dots validation", {
4848
# We don't detect completely-bogus arg names until predict time:
4949
expect_no_error(f_bad_arg <- frosting() %>% layer_predict(bogus_argument = "something"))
5050
wf_bad_arg <- wf %>% add_frosting(f_bad_arg)
51-
expect_snapshot(error = TRUE, predict(wf_bad_arg, latest))
51+
expect_error(predict(wf_bad_arg, latest))
5252
# ^ (currently with a awful error message, due to an extra comma in parsnip::check_pred_type_dots)
5353

5454
# Some argument names only apply for some prediction `type`s; we don't check

0 commit comments

Comments
 (0)