Increase test coverage from 63% to 67% #129
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Test coverage fell below the 68% threshold. Added 42 test functions targeting high-impact uncovered code paths to restore coverage above threshold.
Changes
Utility Functions (11 tests)
deep_convert_to_dict: object/primitive conversions,__dict__handling, exception fallbacksatomic_write_json: successful writes, temp file cleanup on failure_sanitize_profile_name_for_filename: special character handlingApplication Lifecycle (5 tests)
check_for_updates_task: script missing, success/failure paths, timeout handlingError Handling (10 tests)
parse_gemini_error: quota exhausted, rate limits, API auth, network errors, MCP connection, safety filtersAPI Initialization (4 tests)
get_vision_model: lazy init, missing API key validation, cachingget_meticulous_api: lazy init, HTTP prefix handling, cachingEndpoints (7 tests)
/api/settings: API key masking, environment variable precedence, error handling/api/restart: file creation/api/logs: file not found handling/api/version: structure validationData Operations (5 tests)
Coverage Impact
Remaining uncovered code consists primarily of complex async workflows (scheduled shot execution, persistence restoration), MCP integration paths, and Gemini CLI subprocess interactions.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.