Skip to content

add skip for method moved to workflows #154

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 1 commit into from
Dec 15, 2023
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
16 changes: 8 additions & 8 deletions tests/testthat/_snaps/parsnip-survival-censoring-weights.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,6 @@
Error in `.censoring_weights_graf()`:
! There is no `.censoring_weights_graf()` method for objects with class(es): 'character'

---

Code
.censoring_weights_graf(workflows::workflow())
Condition
Error in `.censoring_weights_graf()`:
! The workflow does not have a model fit object.

---

Code
Expand Down Expand Up @@ -55,6 +47,14 @@
2 <tibble [2 x 5]> 455
3 <tibble [2 x 5]> 1010+

# error for .censoring_weights_graf.workflow()

Code
.censoring_weights_graf(workflows::workflow())
Condition
Error in `.censoring_weights_graf()`:
! The workflow does not have a model fit object.

# error for .censoring_weights_graf() from .check_censor_model()

Code
Expand Down
10 changes: 9 additions & 1 deletion tests/testthat/test-parsnip-survival-censoring-weights.R
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ test_that("error messages in context of .censoring_weights_graf()", {

expect_snapshot(error = TRUE, .censoring_weights_graf("nothing useful"))

expect_snapshot(error = TRUE, .censoring_weights_graf(workflows::workflow()))
# temporarily moved to its own test below to allow skipping of (only) this test
# based on dev version number
#expect_snapshot(error = TRUE, .censoring_weights_graf(workflows::workflow()))

# temporarily moved to its own test below to allow skipping of (only) this test
# based on dev version number
Expand Down Expand Up @@ -128,6 +130,12 @@ test_that("error messages in context of .censoring_weights_graf()", {
})
})

test_that("error for .censoring_weights_graf.workflow()", {
# temporarily its own test, see above
skip_if_not_installed("workflows", minimum_version = "1.1.3.9001")
expect_snapshot(error = TRUE, .censoring_weights_graf(workflows::workflow()))
})

test_that("error for .censoring_weights_graf() from .check_censor_model()", {
# temporarily its own test, see above
skip_if_not_installed("parsnip", minimum_version = "1.1.0.9003")
Expand Down