Default ``max_turns`` is the module-level ``MAX_TURNS`` constant.
(tmp_path: Path)
| 287 | |
| 288 | @pytest.mark.asyncio |
| 289 | async 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 |
nothing calls this directly
no test coverage detected