MCPcopy Create free account
hub / github.com/VectifyAI/OpenKB / test_run_skill_default_max_turns

Function test_run_skill_default_max_turns

tests/test_skill_runner.py:289–308  ·  view source on GitHub ↗

Default ``max_turns`` is the module-level ``MAX_TURNS`` constant.

(tmp_path: Path)

Source from the content-addressed store, hash-verified

287
288@pytest.mark.asyncio
289async def test_run_skill_default_max_turns(tmp_path: Path):
290 """Default ``max_turns`` is the module-level ``MAX_TURNS`` constant."""
291 kb_dir = _make_kb(tmp_path)
292 _install_skill(kb_dir, "default-budget")
293
294 captured: dict = {}
295
296 async def fake_runner_run(agent, seed, **kw):
297 captured["max_turns"] = kw.get("max_turns")
298 return MagicMock()
299
300 with patch("openkb.agent.skill_runner.Runner.run", new=fake_runner_run):
301 await run_skill(
302 skill_name="default-budget",
303 intent="x",
304 kb_dir=kb_dir,
305 model="openai/gpt-4o",
306 )
307
308 assert captured["max_turns"] == MAX_TURNS

Callers

nothing calls this directly

Calls 3

run_skillFunction · 0.90
_install_skillFunction · 0.85
_make_kbFunction · 0.70

Tested by

no test coverage detected