Skip to content

test: Sprint test-1 batch 3 — +70 tests (total 149)#64

Merged
pablotis merged 1 commit intostagingfrom
chore/tests-sprint-1-batch-2
May 5, 2026
Merged

test: Sprint test-1 batch 3 — +70 tests (total 149)#64
pablotis merged 1 commit intostagingfrom
chore/tests-sprint-1-batch-2

Conversation

@pablotis
Copy link
Copy Markdown
Collaborator

@pablotis pablotis commented May 5, 2026

Summary

Cierra el Sprint test-1 cubriendo las funciones puras restantes:

  • arma_matriz_transicion (matriz NxN, suma 100%, orden, fallbacks)
  • build_tasas_historico (trimestral/anual, invariantes, desde_panel)
  • regenerar_calidad_panel (schema, idempotencia, % en rango)
  • Utilidades pequeñas: formato_delta, sankey_label_legible, sankey_nodes_orden

70 tests nuevos. Suite completa pasa de 79 → 149 tests PASS · 0 fail.

armo_base_panel modo legacy queda diferido a Sprint test-2 (mejor cubrirlo junto con runtime mode usando testServer).

Test plan

  • Suite local pasa (Rscript tests/testthat.R).
  • CI (tests-unit.yml) verde.
  • No hay regresiones en tests previos (42 + 37 + 70 = 149).

🤖 Generated with Claude Code

Cobertura de funciones puras restantes del Sprint test-1:

- arma_matriz_transicion (R/utils_analisis.R): 6 tests para matriz NxN
  (estructura, suma 100% por fila, orden de etiquetas, manejo de
  categorías ausentes, soporte CAT_OCUP).
- build_tasas_historico (ETL/99-functions.R): 8 tests para output
  trimestral/anual, invariantes (persistencia + salida = 100, tasas
  en [0, 100]), filtro desde_panel, vars_extra.
- regenerar_calidad_panel (ETL/99-functions.R): 6 tests con
  with_tempdir() para schema, formato de periodos, idempotencia,
  % en rango, n_panel <= n_t0.
- formato_delta (R/utils_analisis.R): 4 tests para flecha + signo
  + 'sin comparación' en NA/NULL.
- sankey_label_legible (R/utils_analisis.R): 5 tests para mapeo de
  ESTADO/CAT_OCUP/formalidad, vectorización, fallback.
- sankey_nodes_orden (R/utils_analisis.R): 3 tests para estructura
  de columna y orden no-alfabético.

Quedan fuera del Sprint test-1: armo_base_panel modo legacy (mejor
cubrirlo en Sprint test-2 junto con runtime mode usando testServer).

Suite completa: 149 tests PASS · 0 fail · 1m local.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@pablotis pablotis merged commit ecff6d8 into staging May 5, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant