Repository navigation
test: cover LLMRouter and open_folder dispatch - #38
Merged
Merged
Conversation
LLMRouter had no dedicated tests (38% coverage): __post_init__ side effects on litellm globals / provider env, the ollama model_id prefix rule, and complete/acomplete kwargs assembly were unverified. Add tests that stub litellm.completion/acompletion so no network is used, with a fixture that restores litellm.api_key/api_base and env vars. open_folder was only exercised by prepare_data_folder's test; add per-platform dispatch and failure-path tests with subprocess.Popen monkeypatched so no explorer process is spawned. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
自动维护改动
类型:维护(测试覆盖)
改动:新增
tests/test_llm_router.py(10 用例:api_key/base_url 对 litellm 全局与 provider 环境变量的副作用、model_id的 ollama 前缀规则参数化、complete/acomplete的 kwargs 组装与 tools 透传,全部 stublitellm.completion/acompletion不触网,fixture 隔离 litellm 全局状态),llm/router.py覆盖 38%→100%;新增tests/test_open_folder.py(5 用例:win32/darwin/linux 分派、str 路径解析、Popen 失败返回 False 并告警,Popen 已 monkeypatch 不拉起进程),orchestrator/folder.py50%→100%。+149/-0,仅 tests/**,未动 src。测试:通过(本地全量 455 passed / 1 skipped,ruff check + format 全过)
参考:无
本 PR 由每日维护任务生成,请人工 review 后再合并。
🤖 Generated with Claude Code