## Test coverage: site
Test coverage: site.py build/publish¶
Add tests for untested site.py functions: build, publish, _serve_cmd, _build_cmd, _prepare_site_chatbot.
What to test¶
_build_cmd()/_serve_cmd(): verify correct command construction for mkdocs/sphinx/vite frameworks.build(): verify it calls the right subprocess with correct args. Mock subprocess._prepare_site_chatbot(): verify chatbot asset injection when enabled in config.- Error paths: missing framework, missing config file.
Where¶
- Source:
src/projio/site.py - Tests: add to
tests/test_site.py
Approach¶
Mock subprocess.run to avoid actually building sites. Use tmp_path with site config. Existing test_site.py covers detection and port management — add build/publish tests alongside.
Related Notes¶
- issue-arash-20260412-013432-321867.md — Sister issue in the same test coverage batch — mcp/pipeio
- issue-arash-20260412-013422-048012.md — Sister issue in the same test coverage batch — cli
- issue-arash-20260412-013412-040281.md — Sister issue in the same test coverage batch — render
- issue-arash-20260412-013402-247547.md — Sister issue in the same test coverage batch — sync
- issue-arash-20260412-013344-955432.md — Sister issue in the same test coverage batch — config
Batch Result¶
- status: done
- batch queue_id:
fa9ae36ce1aa - session:
bf8a344f-5f23-4791-ab7b-17a624a7fc7f - batch duration: 441.8s