1
+ # These tests address #290:
2
+ # https://github.com/cmu-delphi/epipredict/issues/290
3
+
1
4
library(dplyr )
2
5
train <- jhu_csse_daily_subset | >
3
6
filter(time_value > = as.Date(" 2021-10-01" )) | >
@@ -13,7 +16,6 @@ test_that("flatline determines target_date where forecast_date exists", {
13
16
ahead = 1L
14
17
)
15
18
)
16
-
17
19
# previously, if target_date existed, it could be
18
20
# erroneously incremented by the ahead
19
21
expect_identical(
@@ -24,9 +26,6 @@ test_that("flatline determines target_date where forecast_date exists", {
24
26
flat $ predictions $ forecast_date ,
25
27
rep(as.Date(" 2021-12-31" ), ngeos )
26
28
)
27
-
28
- # potentially resulted in NA predictions
29
- # see #290 https://github.com/cmu-delphi/epipredict/issues/290
30
29
expect_true(all(! is.na(flat $ predictions $ .pred_distn )))
31
30
expect_true(all(! is.na(flat $ predictions $ .pred )))
32
31
})
@@ -50,9 +49,6 @@ test_that("arx_forecaster determines target_date where forecast_date exists", {
50
49
arx $ predictions $ forecast_date ,
51
50
rep(as.Date(" 2021-12-31" ), ngeos )
52
51
)
53
-
54
- # potentially resulted in NA predictions
55
- # see #290 https://github.com/cmu-delphi/epipredict/issues/290
56
52
expect_true(all(! is.na(arx $ predictions $ .pred_distn )))
57
53
expect_true(all(! is.na(arx $ predictions $ .pred )))
58
54
})
@@ -67,7 +63,6 @@ test_that("arx_classifier determines target_date where forecast_date exists", {
67
63
ahead = 1L
68
64
)
69
65
)
70
-
71
66
# previously, if target_date existed, it could be
72
67
# erroneously incremented by the ahead
73
68
expect_identical(
@@ -78,8 +73,5 @@ test_that("arx_classifier determines target_date where forecast_date exists", {
78
73
arx $ predictions $ forecast_date ,
79
74
rep(as.Date(" 2021-12-31" ), ngeos )
80
75
)
81
-
82
- # potentially resulted in NA predictions
83
- # see #290 https://github.com/cmu-delphi/epipredict/issues/290
84
76
expect_true(all(! is.na(arx $ predictions $ .pred_class )))
85
77
})
0 commit comments