Repository navigation
Testing
Utsha Basak edited this page Oct 24, 2026
·
1 revision
- Every behaviour change comes with tests.
- No network access in tests; external APIs are mocked.
- Deterministic: fixed random seeds, fixed clocks where time matters.
- Cross-platform: CI runs on Linux and Windows, and tests must handle CRLF line endings.
| Directory | Contents |
|---|---|
tests/unit/ |
Fast, isolated tests per module |
tests/integration/ |
End-to-end flows (simulator to report) |
tests/fixtures/ |
Small synthetic inputs |
tests/golden/ |
Expected outputs for golden-file tests (reports, CLI output) |
| Kind | Used for |
|---|---|
| Unit | Parsers, schema validation, rule matching, scoring, redaction |
| Property-based (Hypothesis) | Parsers never crash; the window engine is order-independent within its lateness bound |
| Golden-file | Report layouts and CLI output stay stable |
| Rule tests | Every detection rule has positive and negative fixtures; the suite fails if one is missing |
| Integration | Simulator, parse, detect, incidents, report, with ground-truth assertions |
| ML | Tiny fixture datasets, leakage assertions, seed reproducibility |
uv run pytest -m "not slow" # skip long-running tests
uv run pytest -m integration # only integration testsWarnings are treated as errors, and coverage below 85 % fails the run.
Repository · Changelog · Security · MIT License
Prohori
Contributing
Reference