Skip to content

Commit 45c5ab6

Browse files
committed
Finished test
1 parent e60abfd commit 45c5ab6

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

tests/testthat/test-step_naomit2.R

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ extract <- function(recipe) {
1919
recipe
2020
}
2121

22-
# Tests
23-
test_that("Check that epi_ahead shifts properly", {
24-
expect_identical(step_naomit2(r),
25-
r %>%
26-
step_naomit(all_predictors()) %>%
27-
step_naomit(all_outcomes(), skip = TRUE))
28-
})
29-
30-
z <- step_naomit2(r)
22+
z1 <- step_naomit2(r)
3123
z2 <- r %>%
3224
step_naomit(all_predictors()) %>%
3325
step_naomit(all_outcomes(), skip = TRUE)
26+
27+
# Tests
28+
test_that("Check that both functions behave the same way", {
29+
expect_identical(z1$steps[[3]][-1][-5],z2$steps[[3]][-1][-5])
30+
expect_identical(z1$steps[[4]][-1][-5],z2$steps[[4]][-1][-5])
31+
expect_identical(class(z1$steps[[3]]),class(z2$steps[[3]]))
32+
expect_identical(class(z1$steps[[4]]),class(z2$steps[[4]]))
33+
})

0 commit comments

Comments
 (0)