test: add tests for setup wizard personalization and system prompt builder
Cover _USE_CASE_PLUGINS mapping, _suggest_plugins side effects, _build_system_base output for all name/purpose combinations, and GeneralConfig.purpose round-trip. Also update CLAUDE.md with the testing workflow rule. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -261,6 +261,14 @@ chore: description
|
||||
|
||||
## Workflow Rules
|
||||
|
||||
### Testing
|
||||
|
||||
- **Write tests for every new feature.** A feature without tests is incomplete — do not commit without them.
|
||||
- New tests go in `tests/unit/` for pure-logic helpers and `tests/security/` for security-boundary code.
|
||||
- All existing tests must continue to pass — run `pytest tests/ -v` before committing.
|
||||
- Test pure functions directly; do not test interactive I/O (questionary, Rich output) — only test the logic helpers those flows call.
|
||||
- For Rich output, capture side effects by monkeypatching `console.print` rather than using `capsys`.
|
||||
|
||||
### Bugfixes
|
||||
|
||||
- **Stay under 50 lines changed.** Find the root cause and fix it directly.
|
||||
|
||||
Reference in New Issue
Block a user