Skip to content

Commit d89ea89

Browse files
Merge pull request #82 from tidymodels/newdata-parsnip
update snaps with new parsnip `newdata` check helper
2 parents ef156ca + f0c9321 commit d89ea89

File tree

4 files changed

+6
-2
lines changed

4 files changed

+6
-2
lines changed

tests/testthat/_snaps/glmnet-logistic.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Code
44
multi_predict(class_fit, newdata = wa_churn[1:4, vars], type = "prob")
55
Error <rlang_error>
6-
Did you mean to use `new_data` instead of `newdata`?
6+
Please use `new_data` instead of `newdata`.
77

88
# error traps
99

tests/testthat/_snaps/glmnet-multinom.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Code
44
multi_predict(xy_fit, newdata = hpc[rows, 1:4], penalty = c(0.1, 0.5))
55
Error <rlang_error>
6-
Did you mean to use `new_data` instead of `newdata`?
6+
Please use `new_data` instead of `newdata`.
77

88
# error traps
99

tests/testthat/test-glmnet-logistic.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,8 @@ test_that('multi_predict() with default or single penalty value', {
318318
mp_res <- do.call("rbind", mp_res$.pred)
319319
expect_equal(mp_res[[".pred_No"]], unname(pred_glmn[,1]))
320320

321+
skip_if(packageVersion("parsnip") < "1.0.4.9002")
322+
321323
expect_snapshot(error = TRUE, {
322324
multi_predict(class_fit, newdata = wa_churn[1:4, vars], type = "prob")
323325
})

tests/testthat/test-glmnet-multinom.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,8 @@ test_that("multi_predict() with default or single penalty value", {
357357
NA
358358
)
359359

360+
skip_if(packageVersion("parsnip") < "1.0.4.9002")
361+
360362
expect_snapshot(error = TRUE, {
361363
multi_predict(xy_fit, newdata = hpc[rows, 1:4], penalty = c(0.1, 0.5))
362364
})

0 commit comments

Comments
 (0)