Commit be9bb3d
fer
test: add comprehensive ontosim module test suite (Phase 1, Task 2)
Intent: Increase test coverage for src/tnfr/ontosim orchestration layer
Operators involved: Testing infrastructure (no runtime operators)
Affected invariants: #8 (Controlled Determinism), #1 (EPI as Coherent Form)
Key changes:
- Created tests/ontosim/__init__.py and test_ontosim_runner.py
- Added 39 test cases across 10 test classes
- All tests passing (39/39)
Test coverage:
- TestPrepareNetwork: 7 tests (initialization, history buffers, callbacks, ΔNFR hooks)
- TestStep: 7 tests (single-step execution, attribute updates, custom dt)
- TestRun: 6 tests (multi-step execution, zero steps, parameter propagation)
- TestReproducibility: 3 tests (deterministic with seeds - Invariant #8)
- TestIntegration: 3 tests (different topologies, mixed step/run, disconnected graphs)
- TestEdgeCases: 6 tests (single node, empty graph, large graphs, unprepared handling)
- TestHistoryTracking: 3 tests (buffer structure, maxlen, types)
- TestCallbackIntegration: 2 tests (structure, custom callbacks)
- TestParameterOverrides: 2 tests (DT override, multiple params, override_defaults flag)
Key findings:
- Node attributes use Unicode: 'νf' (not 'nu_f'), 'theta', 'EPI', 'Si'
- Parameters: 'DT' (not 'DT_DEFAULT'), 'RANDOM_SEED'
- History buffers exist but populate only with observers/callbacks
- Time tracking not directly exposed in G.graph['t']
Status: All 39 tests passing
Health: 100/100 maintained
Expected risks/dissonances: None - all tests adapted to actual API
Metrics before/after:
- Test files: 490 → 492 (+2)
- Health: 100/100 → 100/100 (maintained)
- Coverage ontosim: TBD (needs coverage run)1 parent 71ae428 commit be9bb3d
2 files changed
+532
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
0 commit comments