@@ -10,7 +10,7 @@ test_that("data.frame must contain geo_value, time_value and version columns", {
1010 expect_error(as_epi_archive(select(dt , - geo_value ), compactify = FALSE ),
1111 regexp = " There is no geo_value column or similar name"
1212 )
13- expect_error(expect_message( as_epi_archive(select(dt , - time_value ), compactify = FALSE ) ),
13+ expect_error(as_epi_archive(select(dt , - time_value ), compactify = FALSE ),
1414 regexp = " There is no time_value column or similar name"
1515 )
1616 expect_error(as_epi_archive(select(dt , - version ), compactify = FALSE ),
@@ -20,18 +20,24 @@ test_that("data.frame must contain geo_value, time_value and version columns", {
2020
2121test_that(" as_epi_archive custom name mapping works correctly" , {
2222 # custom name works correctly
23- suppressWarnings(expect_equal(
24- as_epi_archive(rename(dt , weirdName = version ), version = weirdName ),
25- as_epi_archive(dt )
26- ))
27- suppressWarnings(expect_equal(
28- as_epi_archive(rename(dt , weirdName = geo_value ), geo_value = weirdName ),
29- as_epi_archive(dt )
30- ))
31- suppressWarnings(expect_equal(
32- as_epi_archive(rename(dt , weirdName = time_value ), time_value = weirdName ),
33- as_epi_archive(dt )
34- ))
23+ expect_equal(
24+ as_epi_archive(rename(dt , weirdName = version ),
25+ version = weirdName , compactify = TRUE
26+ ),
27+ as_epi_archive(dt , compactify = TRUE )
28+ )
29+ expect_equal(
30+ as_epi_archive(rename(dt , weirdName = geo_value ),
31+ geo_value = weirdName , compactify = TRUE
32+ ),
33+ as_epi_archive(dt , compactify = TRUE )
34+ )
35+ expect_equal(
36+ as_epi_archive(rename(dt , weirdName = time_value ),
37+ time_value = weirdName , compactify = TRUE
38+ ),
39+ as_epi_archive(dt , compactify = TRUE )
40+ )
3541
3642 expect_error(
3743 as_epi_archive(
0 commit comments