Skip to content

Commit

Permalink
transition tests to reflect newest probably version
Browse files Browse the repository at this point in the history
  • Loading branch information
simonpcouch committed Nov 12, 2024
1 parent f83ab23 commit ef341cc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
9 changes: 4 additions & 5 deletions tests/testthat/test-adjust-numeric-calibration.R
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,13 @@ test_that("adjust_numeric_calibration() respects `method` argument", {
adjust_numeric_calibration(method = "isotonic")
)

# TODO: cannot be `expect_no_condition()` due to tidymodels/probably#157
expect_no_error(expect_no_warning(
expect_no_condition(
tlr_fit <- fit(tlr, d_calibration, outcome = y, estimate = y_pred)
))
)

expect_no_error(expect_no_warning(
expect_no_condition(
tlr_pred <- predict(tlr_fit, d_test)
))
)

# classes are as expected
expect_s3_class(tlr, "tailor")
Expand Down
8 changes: 4 additions & 4 deletions tests/testthat/test-adjust-probability-calibration.R
Original file line number Diff line number Diff line change
Expand Up @@ -61,19 +61,19 @@ test_that("basic adjust_probability_calibration() usage works", {
)

# TODO: cannot be `expect_no_condition()` due to tidymodels/probably#157
expect_no_error(expect_no_warning(
expect_no_condition(
tlr_fit <- fit(
tlr,
d_calibration,
outcome = c(truth),
estimate = c(predicted),
probabilities = c(Class1, Class2)
)
))
)

expect_no_error(expect_no_warning(
expect_no_condition(
tlr_pred <- predict(tlr_fit, d_test)
))
)

# classes are as expected
expect_s3_class(tlr, "tailor")
Expand Down

0 comments on commit ef341cc

Please sign in to comment.