Skip to content

test: cover LLMRouter and open_folder dispatch - #38

Merged
Anai-Guo merged 1 commit into
mainfrom
chore/auto-maint-2026-10-08
Oct 9, 2026
Merged

Anai-Guo merged 1 commit into
mainfrom
chore/auto-maint-2026-10-08

Conversation

@Anai-Guo

@Anai-Guo Anai-Guo commented Oct 8, 2026

Copy link
Copy Markdown
Owner

自动维护改动

类型:维护(测试覆盖)
改动:新增 tests/test_llm_router.py(10 用例:api_key/base_url 对 litellm 全局与 provider 环境变量的副作用、model_id 的 ollama 前缀规则参数化、complete/acomplete 的 kwargs 组装与 tools 透传,全部 stub litellm.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.py 50%→100%。+149/-0,仅 tests/**,未动 src。
测试:通过(本地全量 455 passed / 1 skipped,ruff check + format 全过)
参考:无

本 PR 由每日维护任务生成,请人工 review 后再合并。

🤖 Generated with Claude Code

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>
@Anai-Guo
Anai-Guo merged commit 3804274 into main Oct 9, 2026
3 checks passed
@Anai-Guo
Anai-Guo deleted the chore/auto-maint-2026-10-08 branch October 9, 2026 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant