## Test coverage: cli
Test coverage: cli.py command dispatch¶
Add tests for CLI command dispatch in src/projio/cli.py.
What to test¶
main()withinitsubcommand: verify scaffold is called with correct args.main()withsyncsubcommand: verify sync_workspace is called.main()withconfig showsubcommand: verify output.main()with no args: verify help/error.main()withset-pythonsubcommand: verify set_python is called.
Where¶
- Source:
src/projio/cli.py - Tests: add to
tests/test_cli.py
Approach¶
Use monkeypatch to mock downstream functions (scaffold, sync_workspace, etc.) and verify they're called with expected args. Use capsys for output capture. Existing test_cli.py has parser tests — add dispatch tests alongside.
Related Notes¶
- issue-arash-20260412-013412-040281.md — Same test coverage initiative — render.py tests
- issue-arash-20260412-013402-247547.md — Same test coverage initiative — sync.py tests
- issue-arash-20260412-013344-955432.md — Same test coverage initiative — config.py tests
Batch Result¶
- status: done
- batch queue_id:
fa9ae36ce1aa - session:
bf8a344f-5f23-4791-ab7b-17a624a7fc7f - batch duration: 441.8s