Skip to content

Commit ef341cc

Browse files
committed
transition tests to reflect newest probably version
tidymodels/probably#158
1 parent f83ab23 commit ef341cc

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

tests/testthat/test-adjust-numeric-calibration.R

+4-5
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,13 @@ test_that("adjust_numeric_calibration() respects `method` argument", {
4747
adjust_numeric_calibration(method = "isotonic")
4848
)
4949

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

55-
expect_no_error(expect_no_warning(
54+
expect_no_condition(
5655
tlr_pred <- predict(tlr_fit, d_test)
57-
))
56+
)
5857

5958
# classes are as expected
6059
expect_s3_class(tlr, "tailor")

tests/testthat/test-adjust-probability-calibration.R

+4-4
Original file line numberDiff line numberDiff line change
@@ -61,19 +61,19 @@ test_that("basic adjust_probability_calibration() usage works", {
6161
)
6262

6363
# TODO: cannot be `expect_no_condition()` due to tidymodels/probably#157
64-
expect_no_error(expect_no_warning(
64+
expect_no_condition(
6565
tlr_fit <- fit(
6666
tlr,
6767
d_calibration,
6868
outcome = c(truth),
6969
estimate = c(predicted),
7070
probabilities = c(Class1, Class2)
7171
)
72-
))
72+
)
7373

74-
expect_no_error(expect_no_warning(
74+
expect_no_condition(
7575
tlr_pred <- predict(tlr_fit, d_test)
76-
))
76+
)
7777

7878
# classes are as expected
7979
expect_s3_class(tlr, "tailor")

0 commit comments

Comments
 (0)