Skip to content

test(scripts): fix and extend generate_catalog tests (cycle 84)#2025

Merged
jsboige merged 1 commit into
mainfrom
test/generate-catalog-outputless-todo-boundary
Jun 1, 2026
Merged

test(scripts): fix and extend generate_catalog tests (cycle 84)#2025
jsboige merged 1 commit into
mainfrom
test/generate-catalog-outputless-todo-boundary

Conversation

@jsboige
Copy link
Copy Markdown
Owner

@jsboige jsboige commented Jun 1, 2026

Summary

Fix broken test and add 27 new tests for generate_catalog.py critical-path catalogue logic.

Changes

  • Fix: test_import_not_outputlesstest_import_is_outputless (imports recognized as outputless since enrich(Sudoku,GameTheory,Search): add content-specific conclusions to 7 notebooks (4 BETA->PRODUCTION) #2006/fix(catalog): extend outputless-by-design for config calls (+14 BETA->PRODUCTION) #2018)
  • New: TestIsOutputlessByDesign (11 tests) — import/import_from, config calls (plt.style.use, warnings.filterwarnings, np.set_printoptions), negatives (display, pprint, plt.show, render), mixed import+config, assign+config
  • New: TestClassifyMaturityCloud (5 tests) — requires_cloud bypass for notebooks without outputs, structure requirements, edge cases
  • New: TestClassifyMaturityKernel (3 tests) — unknown/empty/None kernel → BETA
  • New: TestIsOutputlessConfigCalls (6 tests) — method calls, annotated assign, async def, syntax error, config with args
  • New: TestClassifyMaturityTodoBoundary (4 tests) — output-gate-priority behavior: cells without outputs → DRAFT before TODO count, mixed outputs+TODOs → ALPHA, >10 TODOs → DRAFT, nearly_all_outputs → BETA
  • Refactor: Extract _make_nb helper to module-level for cross-class reuse

Validation

2171 passed in 128.41s

Full scripts test suite green.

Files changed

  • scripts/tests/test_generate_catalog.py (+240/-21)

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

…fig calls + maturity edge cases (cycle 84)

Fix broken test_import_not_outputless (imports now outputless-by-design since #2006/#2018).
Add 27 new tests:
- TestIsOutputlessByDesign: 11 config call branches (import, plt.style.use, warnings, np, display/pprint/show/render negatives)
- TestClassifyMaturityCloud: 5 requires_cloud edge cases
- TestClassifyMaturityKernel: 3 kernel edge cases
- TestIsOutputlessConfigCalls: 6 AST-level edge cases
- TestClassifyMaturityTodoBoundary: 4 tests verifying output-gate-priority behavior
Extract _make_nb helper to module-level for cross-class reuse.
All 2171 tests passing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Collaborator

@clusterManager-Myia clusterManager-Myia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Hermes] — APPROVED

Tests unitaires complets pour generate_catalog cycle 84. Couvre bien les edge cases :

  • Cloud notebooks (requires_cloud=True bypass)
  • Kernel edge cases (unknown/empty/None → BETA)
  • TODO boundary (output gate fires before TODO count)
  • Config calls outputless classification
  • Refactoring propre de _make_nb en helper global

CI pass. Aucun concern.

@jsboige jsboige merged commit c33178b into main Jun 1, 2026
2 checks passed
@jsboige jsboige deleted the test/generate-catalog-outputless-todo-boundary branch June 1, 2026 09:01
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.

2 participants