Testing
INDW test profiles, pytest markers, and writing subsystem tests for pipeline changes.
INDW uses pytest with marker-based profiles for unit, integration, parity, and certification testing. Run tests via the CLI or directly with pytest.
Test profiles
| Profile | Markers | Parallel | Paths |
|---|---|---|---|
unit | not integration and not slow | Yes (-n auto) | tests/ |
critical | critical and not integration | No | tests/subsystems/ |
parity | integration | No | parity test files |
integration | integration or slow | No | tests/ |
smoke | smoke | No | tests/ |
Parity tests
Parity tests verify determinism across backends and worker counts:
Key parity test files:
| File | Verifies |
|---|---|
test_stage_pool_parity.py | Stage pool output consistency |
test_parallel_merge_parity.py | Workers=1 vs workers=N hash match |
test_tier_admission_parity.py | Admission tier consistency |
test_execution_backend.py | Local vs multiprocess backend match |
Pytest markers
Available markers: integration, slow, smoke, critical, property, benchmark, certification.
Running pytest directly
Extra pytest arguments pass through the CLI:
Writing subsystem tests
Place integration tests in tests/subsystems/. Follow existing patterns:
Test fixtures
Red team and regression fixtures live in tests/fixtures/:
Use fixtures for adversarial content testing (PII, toxicity, prompt injection).
Coverage
Coverage threshold is 55% (fail_under in pyproject.toml).
CI recommendation
Pipeline changes that affect acceptance decisions require indw validate to pass. Hash parity is a merge blocker for production pipelines.