Skip to content

Commit fe09e6a

Browse files
committed
snapshot dates starting with 0 are troublesome
1 parent 244dacb commit fe09e6a

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

tests/testthat/_snaps/snapshots.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1090,7 +1090,7 @@
10901090
Message
10911091
== A basic forecaster of type ARX Forecaster ===================================
10921092
1093-
This forecaster was fit on 0999-01-01.
1093+
This forecaster was fit on 1999-01-01.
10941094
10951095
Training data was an <epi_df> with:
10961096
* Geography: state,
@@ -1113,7 +1113,7 @@
11131113
Message
11141114
== A basic forecaster of type ARX Forecaster ===================================
11151115
1116-
This forecaster was fit on 0999-01-01.
1116+
This forecaster was fit on 1999-01-01.
11171117
11181118
Training data was an <epi_df> with:
11191119
* Geography: state,
@@ -1137,7 +1137,7 @@
11371137
Message
11381138
== A basic forecaster of type ARX Forecaster ===================================
11391139
1140-
This forecaster was fit on 0999-01-01.
1140+
This forecaster was fit on 1999-01-01.
11411141
11421142
Training data was an <epi_df> with:
11431143
* Geography: state,

tests/testthat/test-snapshots.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ test_that("arx_forecaster output format snapshots", {
118118
c("case_rate", "death_rate")
119119
)
120120
expect_equal(as.Date(format(out1$metadata$forecast_created, "%Y-%m-%d")), Sys.Date())
121-
out1$metadata$forecast_created <- as.Date("0999-01-01")
121+
out1$metadata$forecast_created <- as.Date("1999-01-01")
122122
expect_snapshot(out1)
123123
out2 <- arx_forecaster(jhu, "case_rate",
124124
c("case_rate", "death_rate"),
@@ -130,7 +130,7 @@ test_that("arx_forecaster output format snapshots", {
130130
)
131131
)
132132
expect_equal(as.Date(format(out2$metadata$forecast_created, "%Y-%m-%d")), Sys.Date())
133-
out2$metadata$forecast_created <- as.Date("0999-01-01")
133+
out2$metadata$forecast_created <- as.Date("1999-01-01")
134134
expect_snapshot(out2)
135135
out3 <- arx_forecaster(jhu, "death_rate",
136136
c("case_rate", "death_rate"),
@@ -141,7 +141,7 @@ test_that("arx_forecaster output format snapshots", {
141141
)
142142
)
143143
expect_equal(as.Date(format(out3$metadata$forecast_created, "%Y-%m-%d")), Sys.Date())
144-
out3$metadata$forecast_created <- as.Date("0999-01-01")
144+
out3$metadata$forecast_created <- as.Date("1999-01-01")
145145
expect_snapshot(out3)
146146
})
147147

0 commit comments

Comments
 (0)