Skip to content

Commit e60abfd

Browse files
committed
Renamed misnamed test
1 parent e42dd5d commit e60abfd

File tree

2 files changed

+33
-37
lines changed

2 files changed

+33
-37
lines changed

tests/testthat/step_naomit2.R

Lines changed: 0 additions & 37 deletions
This file was deleted.

tests/testthat/test-step_naomit2.R

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
library(dplyr)
2+
library(epiprocess)
3+
library(parsnip)
4+
library(workflows)
5+
6+
# Random generated dataset
7+
set.seed(100)
8+
x <- tibble(geo_value = rep("nowhere",200),
9+
time_value = as.Date("2021-01-01") + 0:199,
10+
case_rate = rpois(100,20) + 1:200,
11+
death_rate = rpois(100,10) + 1:200) %>%
12+
as_epi_df()
13+
14+
r <- epi_recipe(x) %>%
15+
step_epi_ahead(death_rate, ahead = 7) %>%
16+
step_epi_lag(death_rate, lag = c(0,7,14))
17+
18+
extract <- function(recipe) {
19+
recipe
20+
}
21+
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)
31+
z2 <- r %>%
32+
step_naomit(all_predictors()) %>%
33+
step_naomit(all_outcomes(), skip = TRUE)

0 commit comments

Comments
 (0)