test: remove unreachable cases and strengthen weak assertions
This commit is contained in:
1 parent
169062be11
commit
abfe510ce1
25 files changed
+64
-302
No files matched your search
@@ -612,17 +612,6 @@ class TestRunningCounts:
|
||||
|
||||
|
||||
class TestSubagentHook:
|
||||
@pytest.mark.asyncio
|
||||
async def test_before_execute_tools_without_status_preserves_calls(self):
|
||||
hook = _SubagentHook()
|
||||
tool_call = MagicMock()
|
||||
tool_call.name = "read_file"
|
||||
tool_call.arguments = {"path": "/tmp/test"}
|
||||
ctx = _make_hook_context(tool_calls=[tool_call])
|
||||
result = await hook.before_execute_tools(ctx)
|
||||
assert result is None
|
||||
assert ctx.tool_calls == [tool_call]
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_after_iteration_updates_status(self):
|
||||
status = SubagentStatus(
|
||||
@@ -639,14 +628,6 @@ class TestSubagentHook:
|
||||
assert len(status.tool_events) == 1
|
||||
assert status.usage == LLMUsage.reported(input_tokens=100, output_tokens=0)
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_after_iteration_no_status_noop(self):
|
||||
hook = _SubagentHook()
|
||||
ctx = _make_hook_context(iteration=5)
|
||||
result = await hook.after_iteration(ctx)
|
||||
assert result is None
|
||||
assert ctx.iteration == 5
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_after_iteration_sets_error(self):
|
||||
status = SubagentStatus(
|
||||
|
||||
Reference in new issue
Block a user