test: integration tests for addon loader, context, and origin SDK APIs #396

Open
opened 2026-03-03 23:05:06 +00:00 by forbes · 0 comments
Owner

Summary

Add automated tests for the core SDK subsystems: addon loading pipeline, context resolution, and origin management.

Current state (PARTIAL)

tests/run_kindred_tests.py runs two tiers. Tier 1 (test_kindred_pure.py) has ~30 tests covering update_checker and silo_origin basics. No tests exist for:

  • Addon loader discovery, manifest parsing, dependency resolution, load ordering
  • Context registration, resolution, lifecycle callbacks
  • Event bus publish/subscribe
  • Origin registration, per-document association
  • AddonRegistry queries

Scope

Tier 1 (pure Python, no FreeCAD)

  • test_addon_loader.py:
    • Manifest XML parsing (valid, malformed, missing fields)
    • Version bound validation (in-range, out-of-range, missing)
    • Dependency resolution and topological sort
    • Load priority ordering
    • Circular dependency detection
    • Context ID validation (once #388 lands)

Tier 2 (FreeCAD headless)

  • test_context.py:
    • Register/unregister context
    • Context resolution by priority
    • Overlay activation
    • Lifecycle callbacks (once #381 lands)
    • Transition guards (once #386 lands)
  • test_origin.py:
    • Register/unregister origin
    • Per-document origin association (once #391 lands)
    • Origin listing and queries
  • test_events.py:
    • Event bus emit/on/off (once #382 lands)
    • Multiple subscribers
    • Unsubscribe behavior

All runnable via pixi run test-kindred.

Roadmap

v0.2.0 — Testing and Documentation

## Summary Add automated tests for the core SDK subsystems: addon loading pipeline, context resolution, and origin management. ## Current state (PARTIAL) `tests/run_kindred_tests.py` runs two tiers. Tier 1 (`test_kindred_pure.py`) has ~30 tests covering update_checker and silo_origin basics. No tests exist for: - Addon loader discovery, manifest parsing, dependency resolution, load ordering - Context registration, resolution, lifecycle callbacks - Event bus publish/subscribe - Origin registration, per-document association - AddonRegistry queries ## Scope ### Tier 1 (pure Python, no FreeCAD) - `test_addon_loader.py`: - Manifest XML parsing (valid, malformed, missing fields) - Version bound validation (in-range, out-of-range, missing) - Dependency resolution and topological sort - Load priority ordering - Circular dependency detection - Context ID validation (once #388 lands) ### Tier 2 (FreeCAD headless) - `test_context.py`: - Register/unregister context - Context resolution by priority - Overlay activation - Lifecycle callbacks (once #381 lands) - Transition guards (once #386 lands) - `test_origin.py`: - Register/unregister origin - Per-document origin association (once #391 lands) - Origin listing and queries - `test_events.py`: - Event bus emit/on/off (once #382 lands) - Multiple subscribers - Unsubscribe behavior All runnable via `pixi run test-kindred`. ## Roadmap v0.2.0 — Testing and Documentation
forbes added the enhancement label 2026-03-03 23:05:06 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kindred/create#396