Skip to content

Commit e36ab4b

Browse files
committed
test for survival_reg()
1 parent 4ffe7a1 commit e36ab4b

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

tests/testthat/_snaps/translate.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1895,6 +1895,13 @@
18951895
env: empty
18961896
18971897

1898+
# arguments (survival_reg)
1899+
1900+
Code
1901+
basic %>% translate_args()
1902+
Output
1903+
list()
1904+
18981905
# arguments (svm_linear)
18991906

19001907
Code

tests/testthat/test_translate.R

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,17 @@ test_that("arguments (surv_reg)", {
253253
expect_snapshot(translate_args(dist_v %>% set_engine("flexsurv")))
254254
})
255255

256+
# translate.survival_reg -----------------------------------------------------------
257+
test_that("arguments (survival_reg)", {
258+
suppressMessages({
259+
basic <- survival_reg()
260+
})
261+
262+
# this is empty because the engines are not defined in parsnip
263+
expect_snapshot(basic %>% translate_args())
264+
265+
})
266+
256267
# translate.svm_linear ---------------------------------------------------------
257268
test_that("arguments (svm_linear)", {
258269
basic <- svm_linear(mode = "regression")

0 commit comments

Comments
 (0)