Private
Public Access
feat(directives): harvest 5 directives from docs/guide_testing.md (sandbox overview, live_gui session-scoped, defer-not-catch, narrow tests, AST method visibility)
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
# no_real_io_during_tests
|
||||
|
||||
## v1
|
||||
|
||||
**Why this iteration:** Lifted verbatim from `docs/guide_testing.md:9-16 (Overview)`.
|
||||
**Source:** `docs/guide_testing.md:9-16 (Overview)`
|
||||
**Lifted:** 2026-07-02 (Phase A expansion harvest; user directive 2026-07-02)
|
||||
@@ -0,0 +1,10 @@
|
||||
## The 4 test infrastructure principles
|
||||
|
||||
1. **No real I/O during tests** — every test gets a sandboxed workspace via the `isolate_workspace` autouse fixture.
|
||||
2. **No real AI calls** — tests use mock providers, reset session state, and never hit the network.
|
||||
3. **GUI tests launch a real app** — the `live_gui` session fixture starts `sloppy.py --enable-test-hooks` so integration tests can drive the actual app via the Hook API.
|
||||
4. **Tests are categorized by marker** — unit, integration, strict, clean_install, docker — so CI can opt in to expensive tests.
|
||||
|
||||
The autouse `isolate_workspace` fixture (1 of 7 conftest fixtures) gives every test a fresh, isolated workspace so it cannot pollute the user's real `manual_slop.toml`, `presets.toml`, etc. The session-scoped `live_gui` fixture starts `sloppy.py --enable-test-hooks` once per session so integration tests can drive the actual app via the Hook API.
|
||||
|
||||
All test-generated artifacts (logs, temporary workspaces, mock outputs) MUST be written to `tests/artifacts/` or `tests/logs/` (gitignored).
|
||||
Reference in New Issue
Block a user