Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
EmilHvitfeldt committed Dec 13, 2024
1 parent 1f8cb4a commit c9d84b4
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions tests/testthat/test-step_discretize.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,14 @@ test_that("step_discretize works num_breaks = 2", {

suppressWarnings(
rec <- recipes::recipe(mpg ~ ., data = mtcars) %>%
recipes::step_discretize(vs, am, min_unique = 1, num_breaks = 2) %>%
recipes::step_discretize(vs, am, num_breaks = 2) %>%
recipes::prep()
)

res <- dplyr::mutate(mtcars, !!!orbital_inline(orbital(rec)))

exp <- recipes::bake(rec, new_data = mtcars)
exp <- exp[names(res)]
exp$am <- as.character(exp$am)
exp$vs <- as.character(exp$vs)

expect_equal(res, exp)
})
Expand Down

0 comments on commit c9d84b4

Please sign in to comment.