MCPcopy
hub / github.com/wshobson/agents / test_explicit_empty_tools

Method test_explicit_empty_tools

tools/tests/test_adapters.py:1080–1103  ·  view source on GitHub ↗
(self, tmp_path: Path, output_root: Path)

Source from the content-addressed store, hash-verified

1078 assert not _needs_yaml_quoting("Use when testing.")
1079
1080 def test_explicit_empty_tools(self, tmp_path: Path, output_root: Path):
1081 from tools.tests.conftest import _make_agent
1082
1083 plugin_dir = tmp_path / "demo"
1084 plugin_dir.mkdir()
1085 (plugin_dir / ".claude-plugin").mkdir()
1086 (plugin_dir / ".claude-plugin" / "plugin.json").write_text('{"name": "demo"}')
1087 agent = _make_agent(
1088 plugin_dir,
1089 "advisory",
1090 "name: advisory\ndescription: Use when advising.\nmodel: sonnet\ntools: []",
1091 "# Advisory\n",
1092 )
1093 plugin = PluginSource(
1094 name="demo", dir=plugin_dir, plugin_json={"name": "demo"}, agents=[agent]
1095 )
1096 CopilotAdapter(output_root=output_root).emit_plugin(plugin)
1097
1098 content = (output_root / ".copilot" / "agents" / "demo__advisory.agent.md").read_text()
1099 fm, body = parse_frontmatter(content)
1100 assert fm["name"] == "demo__advisory"
1101 assert fm["description"] == "Use when advising."
1102 assert fm["model"] == "claude-sonnet-4.6"
1103 assert "tools:" in content
1104
1105 def test_no_tools_field(self, tmp_path: Path, output_root: Path):
1106 from tools.tests.conftest import _make_agent

Callers

nothing calls this directly

Calls 5

_make_agentFunction · 0.90
PluginSourceClass · 0.90
CopilotAdapterClass · 0.90
parse_frontmatterFunction · 0.90
emit_pluginMethod · 0.45

Tested by

no test coverage detected