Skip to content

Commit 1c37e4d

Browse files
committed
switch to rlang
1 parent 161a2f0 commit 1c37e4d

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

tests/testthat/test_surv_reg.R

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ source("helpers.R")
1111
# ------------------------------------------------------------------------------
1212

1313
test_that('primary arguments', {
14-
withr::local_options(lifecycle_verbosity = "quiet")
14+
rlang::local_options(lifecycle_verbosity = "quiet")
1515

1616
basic <- surv_reg()
1717
basic_flexsurv <- translate(basic %>% set_engine("flexsurv"))
@@ -48,7 +48,7 @@ test_that('primary arguments', {
4848
})
4949

5050
test_that('engine arguments', {
51-
withr::local_options(lifecycle_verbosity = "quiet")
51+
rlang::local_options(lifecycle_verbosity = "quiet")
5252

5353
fs_cl <- surv_reg()
5454
expect_equal(translate(fs_cl %>% set_engine("flexsurv", cl = .99))$method$fit$args,
@@ -64,7 +64,7 @@ test_that('engine arguments', {
6464

6565

6666
test_that('updating', {
67-
withr::local_options(lifecycle_verbosity = "quiet")
67+
rlang::local_options(lifecycle_verbosity = "quiet")
6868

6969
expr1 <- surv_reg() %>% set_engine("flexsurv", cl = varying())
7070
expr1_exp <- surv_reg(dist = "lnorm") %>% set_engine("flexsurv", cl = .99)
@@ -81,14 +81,14 @@ test_that('updating', {
8181
})
8282

8383
test_that('bad input', {
84-
withr::local_options(lifecycle_verbosity = "quiet")
84+
rlang::local_options(lifecycle_verbosity = "quiet")
8585

8686
expect_error(surv_reg(mode = ", classification"))
8787
expect_error(translate(surv_reg() %>% set_engine("wat")))
8888
expect_error(translate(surv_reg() %>% set_engine(NULL)))
8989
})
9090

9191
test_that("deprecation warning", {
92-
withr::local_options(lifecycle_verbosity = "warning")
92+
rlang::local_options(lifecycle_verbosity = "warning")
9393
expect_warning(surv_reg())
9494
})

tests/testthat/test_surv_reg_flexsurv.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ complete_form <- Surv(time) ~ age
1616
test_that('flexsurv execution', {
1717
skip_if_not_installed("flexsurv")
1818

19-
withr::local_options(lifecycle_verbosity = "quiet")
19+
rlang::local_options(lifecycle_verbosity = "quiet")
2020
surv_basic <- surv_reg() %>% set_engine("flexsurv")
2121

2222
expect_error(
@@ -53,7 +53,7 @@ test_that('flexsurv execution', {
5353
test_that('flexsurv prediction', {
5454
skip_if_not_installed("flexsurv")
5555

56-
withr::local_options(lifecycle_verbosity = "quiet")
56+
rlang::local_options(lifecycle_verbosity = "quiet")
5757
surv_basic <- surv_reg() %>% set_engine("flexsurv")
5858

5959
res <- fit(

tests/testthat/test_surv_reg_survreg.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ complete_form <- Surv(time) ~ group
1515
test_that('survival execution', {
1616
skip_on_travis()
1717

18-
withr::local_options(lifecycle_verbosity = "quiet")
18+
rlang::local_options(lifecycle_verbosity = "quiet")
1919
surv_basic <- surv_reg() %>% set_engine("survival")
2020
surv_lnorm <- surv_reg(dist = "lognormal") %>% set_engine("survival")
2121

@@ -51,7 +51,7 @@ test_that('survival execution', {
5151
test_that('survival prediction', {
5252
skip_on_travis()
5353

54-
withr::local_options(lifecycle_verbosity = "quiet")
54+
rlang::local_options(lifecycle_verbosity = "quiet")
5555
surv_basic <- surv_reg() %>% set_engine("survival")
5656
surv_lnorm <- surv_reg(dist = "lognormal") %>% set_engine("survival")
5757

0 commit comments

Comments
 (0)