From 6947a3ffa770e64bb6bedcbfeb870199cf13ad5d Mon Sep 17 00:00:00 2001 From: xuhd Date: Fri, 15 May 2026 00:03:07 +0800 Subject: [PATCH] =?UTF-8?q?chore(tests):=20ignore=20tests/=20=E7=9B=AE?= =?UTF-8?q?=E5=BD=95=20+=20=E5=90=8C=E6=AD=A5=E7=8E=B0=E6=9C=89=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E5=88=B0=E6=96=B0=20skill=5Farchive=20=E7=AD=BE?= =?UTF-8?q?=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - .gitignore: 新增 offline-backend-20260512/backend/tests/* 规则, 让后续新增的测试文件不再误进入版本控制 - test_skills_multitenancy.py: 同步上次 feat(skills) 提交里 skill_archive(name, reason) 必填 reason 的签名变更 Co-Authored-By: Claude Opus 4.7 (1M context) --- .gitignore | 1 + .../backend/tests/test_skills_multitenancy.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 3d13b443..cd3c1330 100644 --- a/.gitignore +++ b/.gitignore @@ -77,3 +77,4 @@ offline-backend-20260512/backend/skill_evolution.json skills/ hermes-agent-main/ .gitignore +offline-backend-20260512/backend/tests/* \ No newline at end of file diff --git a/offline-backend-20260512/backend/tests/test_skills_multitenancy.py b/offline-backend-20260512/backend/tests/test_skills_multitenancy.py index dbd5cb1a..4ade945f 100644 --- a/offline-backend-20260512/backend/tests/test_skills_multitenancy.py +++ b/offline-backend-20260512/backend/tests/test_skills_multitenancy.py @@ -559,14 +559,14 @@ def test_skill_archive_tool_refuses_referenced_or_published( # Case A: target is referenced — must refuse. monkeypatch.setattr(curator, "_collect_referenced_skill_names", lambda: {"linked"}) monkeypatch.setattr(curator, "_is_skill_published", lambda name: False) - out_a = tool.invoke({"name": "linked"}) + out_a = tool.invoke({"name": "linked", "reason": "test"}) assert "Refused" in out_a assert "referenced" in out_a # Case B: target is published — must refuse. monkeypatch.setattr(curator, "_collect_referenced_skill_names", lambda: set()) monkeypatch.setattr(curator, "_is_skill_published", lambda name: name == "pub") - out_b = tool.invoke({"name": "pub"}) + out_b = tool.invoke({"name": "pub", "reason": "test"}) assert "Refused" in out_b assert "published" in out_b