Skip to content

Commit

Permalink
remove duplicated tests (closes #40)
Browse files Browse the repository at this point in the history
  • Loading branch information
simonpcouch committed Sep 17, 2024
1 parent dfd9b0e commit d80ef2a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 70 deletions.
39 changes: 0 additions & 39 deletions tests/testthat/_snaps/validation-rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,6 @@
Error in `adjust_probability_calibration()`:
! adjustments that change the hard class predictions must come after adjustments that update the class probability estimates.

---

Code
tailor() %>% adjust_probability_threshold(threshold = 0.4) %>%
adjust_probability_calibration()
Condition
Error in `adjust_probability_calibration()`:
! adjustments that change the hard class predictions must come after adjustments that update the class probability estimates.

---

Code
tailor() %>% adjust_predictions_custom(veg = "potato") %>%
adjust_probability_threshold(threshold = 0.4) %>%
adjust_probability_calibration()
Condition
Error in `adjust_probability_calibration()`:
! adjustments that change the hard class predictions must come after adjustments that update the class probability estimates.

---

Code
Expand All @@ -56,26 +37,6 @@
Error in `adjust_probability_threshold()`:
! adjustments cannot be duplicated: "probability_threshold"

---

Code
tailor() %>% adjust_predictions_custom(veg = "potato") %>%
adjust_probability_threshold(threshold = 0.4) %>%
adjust_probability_threshold(threshold = 0.5) %>%
adjust_probability_calibration()
Condition
Error in `adjust_probability_threshold()`:
! adjustments cannot be duplicated: "probability_threshold"

---

Code
tailor() %>% adjust_equivocal_zone(value = 0.2) %>%
adjust_probability_threshold(threshold = 0.4)
Condition
Error in `adjust_probability_threshold()`:
! Equivocal zone addition should come after adjustments that update the class probability estimates or hard class predictions.

---

Code
Expand Down
31 changes: 0 additions & 31 deletions tests/testthat/test-validation-rules.R
Original file line number Diff line number Diff line change
Expand Up @@ -50,21 +50,6 @@ test_that("validation of adjustments (classification)", {
adjust_probability_calibration()
)

expect_snapshot(
error = TRUE,
tailor() %>%
adjust_probability_threshold(threshold = .4) %>%
adjust_probability_calibration()
)

expect_snapshot(
error = TRUE,
tailor() %>%
adjust_predictions_custom(veg = "potato") %>%
adjust_probability_threshold(threshold = .4) %>%
adjust_probability_calibration()
)

expect_snapshot(
error = TRUE,
tailor() %>%
Expand All @@ -82,22 +67,6 @@ test_that("validation of adjustments (classification)", {
adjust_probability_calibration()
)

expect_snapshot(
error = TRUE,
tailor() %>%
adjust_predictions_custom(veg = "potato") %>%
adjust_probability_threshold(threshold = .4) %>%
adjust_probability_threshold(threshold = .5) %>%
adjust_probability_calibration()
)

expect_snapshot(
error = TRUE,
tailor() %>%
adjust_equivocal_zone(value = .2) %>%
adjust_probability_threshold(threshold = .4)
)

expect_snapshot(
error = TRUE,
tailor() %>%
Expand Down

0 comments on commit d80ef2a

Please sign in to comment.