test: re-baseline canonical_govid literals to 12-char namespace

Swaps every hardcoded 9-char canonical_govid literal (Broward County,
Fort Lauderdale City, Florida/Alabama state govts, Bexar/Tarrant/Wayne
counties, San Diego/Oakland/Miami/Austin cities) for its 12-char Phase P
equivalent, resolved by name+type+state against the regenerated fixture
xwalk. Also updates two gov_name search patterns that no longer match
under Phase P canonical naming ("FLORIDA STATE GOVT" -> "FLORIDA"; the
"Miami" substring test now pins type = "city" since MIAMI-DADE COUNTY's
canonical name now also contains "Miami", which would otherwise make the
match ambiguous across govs_types instead of resolving via largest-pop).
Underlying per-year population figures for Broward County and Alabama
are unchanged, so no expected data-value literals needed recomputation.
Suite: 126 test blocks / 336 expectations, 0 FAIL / 0 WARN / 0 SKIP.
This commit is contained in:
2026-07-11 09:32:02 -04:00
parent 570a9408a2
commit 92c9a7382e
9 changed files with 95 additions and 85 deletions
+5 -4
View File
@@ -66,15 +66,16 @@ test_that("gov_population_yearly exposes one row per (year, canonical_govid)", {
con,
"SELECT year, canonical_govid, population, popyear
FROM gov_population_yearly
WHERE canonical_govid = '101006006'
WHERE canonical_govid = '121011212191'
ORDER BY year"
)
expect_setequal(df$year, c(2019L, 2020L))
expect_equal(nrow(df), 2L)
expect_true(all(!is.na(df$population)))
# Hardcoded values are from the bundled fixture (regenerated 2026-04-29
# against cog_pipeline aad34c6 + bd3e744). Update if the fixture is
# rebuilt against a different source vintage.
# Hardcoded values are from the bundled fixture (regenerated 2026-07-11
# against cog_pipeline publish tree, pipeline_commit 1a00925, Phase P
# schema_version 4). Update if the fixture is rebuilt against a
# different source vintage.
expect_equal(df$population[df$year == 2019L], 1935878L)
expect_equal(df$population[df$year == 2020L], 1952778L)
# Uniqueness on (year, canonical_govid) across the whole view.