chore(tests): ignore tests/ 目录 + 同步现有测试到新 skill_archive 签名

- .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) <noreply@anthropic.com>
This commit is contained in:
xuhdandClaude Opus 4.7 committed 2026-05-15 00:03:07 +08:00
1 parent 62d525dae7
commit 6947a3ffa7
2 files changed
+3 -2

No files matched your search

+1
View File
@@ -77,3 +77,4 @@ offline-backend-20260512/backend/skill_evolution.json
skills/
hermes-agent-main/
.gitignore
offline-backend-20260512/backend/tests/*
@@ -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