← ClaudeAtlas

claudeloop-testinglisted

Explains claudeloop's testing philosophy and pytest layout — fakes over mocks for every port, FakeClock/FakeSleeper for simulating multi-day waits without real sleeping, mandatory Hypothesis property tests for numeric/time-based invariants, per-layer coverage gates (100% for domain and application), and the documented
the-vibey-project/vibey · ★ 2 · AI & Automation · score 68
Install: claude install-skill the-vibey-project/vibey
# claudeloop testing philosophy > **Codex skill mirror** of `.claude/skills/claudeloop-testing/SKILL.md`. When this guidance changes, update Claude skill, Cursor rule, and `.agents/skills/` in the same PR. ## Layout ``` tests/domain/ # pure unit + Hypothesis property tests tests/application/ # fakes for every port (fakes.py), zero real I/O tests/infrastructure/ # adapters (incl. scripted test-agent unit tests) tests/cli/ tests/live/ # opt-in free + paid live tiers tests/live/system/ # marker: system — real FS/git/CLI + scripted agent ``` Run: `pytest` (skips `live` and `system` via addopts). System harness: `pytest -m system`. Live free: `pytest -m live`. Paid: `pytest -m "live and paid" --run-paid-live`. See `docs/guides/live-testing.md`. Coverage: `pytest --cov-report=term-missing` (already the default via `addopts` in `pyproject.toml`). Test-only agent gate (composition root only; not a user feature): `CLAUDELOOP_ALLOW_TEST_AGENT=1` + `CLAUDELOOP_TEST_AGENT_SCRIPT=<json>`. ## Coverage is per-layer, not global — and why There is deliberately **no** blanket `--cov-fail-under` in `pyproject.toml`. CI enforces coverage separately per layer: **100%** on `domain/` and `application/` (zero I/O, zero third-party deps — no excuse for an untested branch, and this is the code deciding whether an unattended multi-day run keeps going, waits, or gives up), a lower floor on `infrastructure/`/`cli/`. When adding domain code, run coverage scoped t