From 8f678c1f85d2a93ad58365168abc8da205bafb44 Mon Sep 17 00:00:00 2001 From: "jinli.yl" Date: Fri, 18 Sep 2026 23:51:45 +0800 Subject: [PATCH] fix(test): make the suite green on CI - Point the cookbook claude_code model assertion at qwen3.7-plus, the default commit 9404e600 set, so the pre-existing red stops blocking - Satisfy pylint on the auto-fin tests: prefer implicit booleaness for the recorded Agent calls and drop an unused tmp_path fixture Co-Authored-By: Claude --- plugins/auto-fin/tests/test_auto_fin.py | 6 +++--- tests/unit/test_cookbook_config.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/auto-fin/tests/test_auto_fin.py b/plugins/auto-fin/tests/test_auto_fin.py index 0dfa564d..5cbb4eda 100644 --- a/plugins/auto-fin/tests/test_auto_fin.py +++ b/plugins/auto-fin/tests/test_auto_fin.py @@ -373,7 +373,7 @@ async def test_research_skips_topics_without_news_and_honours_the_skip_flag(tmp_ response = await AutoFinResearchStep(app_context=app_context, agent_wrapper=agent)(context) - assert agent.calls == [] + assert not agent.calls assert context["auto_fin_notes"] == [] assert response.metadata["note_paths"] == [] assert not (tmp_path / "daily").exists() @@ -426,11 +426,11 @@ async def test_digest_skips_when_the_run_was_already_skipped(tmp_path: Path): await AutoFinDigestStep(app_context=app_context, agent_wrapper=agent)(context) - assert agent.calls == [] + assert not agent.calls assert not (tmp_path / "daily").exists() -def test_normalize_hybrid_wikilinks_is_conservative(tmp_path: Path): +def test_normalize_hybrid_wikilinks_is_conservative(): body = ( "[[digest/wiki/gold.md]](digest/wiki/gold.md) " "[[digest/wiki/gold.md|黄金]]() " diff --git a/tests/unit/test_cookbook_config.py b/tests/unit/test_cookbook_config.py index 233ea4b8..37b14b63 100644 --- a/tests/unit/test_cookbook_config.py +++ b/tests/unit/test_cookbook_config.py @@ -86,7 +86,7 @@ def test_cookbook_enables_embedding_and_separate_agent_backends(monkeypatch): assert components["agent_wrapper"]["default"]["backend"] == "agentscope" assert components["agent_wrapper"]["claude_code"] == { "backend": "claude_code", - "model": "qwen3.8-max", + "model": "qwen3.7-plus", "api_key": "llm-api-key", "base_url": "https://dashscope.aliyuncs.com/apps/anthropic", "permission_mode": "bypassPermissions",