feat: export cog_manifest() accessor + pin CPI coverage 1967-present
This commit is contained in:
@@ -41,3 +41,10 @@ test_that(".inflate preserves NA amounts", {
|
||||
expect_true(is.na(result[2]))
|
||||
expect_false(any(is.na(result[c(1, 3)])))
|
||||
})
|
||||
|
||||
test_that("bundled CPI covers the full 1967+ corpus era through this year", {
|
||||
cpi <- .cpi_table()
|
||||
expect_lte(min(cpi$year), 1967L)
|
||||
expect_gte(max(cpi$year), as.integer(format(Sys.Date(), "%Y")))
|
||||
expect_false(any(is.na(cpi$cpi)))
|
||||
})
|
||||
|
||||
@@ -99,3 +99,14 @@ test_that("remote manifest fetch does not poison cache when response is HTML", {
|
||||
0L
|
||||
)
|
||||
})
|
||||
|
||||
test_that("cog_manifest returns the active session's parsed manifest", {
|
||||
with_fixture_corpus({
|
||||
m <- cog_manifest()
|
||||
expect_type(m, "list")
|
||||
expect_true(m$schema_version >= 4L)
|
||||
yrs <- vapply(m$files$long_partitions, function(p) as.integer(p$year),
|
||||
integer(1))
|
||||
expect_setequal(yrs, c(2019L, 2020L))
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user