fix: cross-platform test compatibility
- test_channel_plugins: fix assertion logic for discoverable channels - test_filesystem_tools: normalize path separators for Windows - test_tool_validation: use python to generate output, avoid cmd line limits
This commit is contained in:
@@ -379,9 +379,11 @@ async def test_exec_always_returns_exit_code() -> None:
|
||||
async def test_exec_head_tail_truncation() -> None:
|
||||
"""Long output should preserve both head and tail."""
|
||||
tool = ExecTool()
|
||||
# Generate output that exceeds _MAX_OUTPUT
|
||||
big = "A" * 6000 + "\n" + "B" * 6000
|
||||
result = await tool.execute(command=f"echo '{big}'")
|
||||
# Generate output that exceeds _MAX_OUTPUT (10_000 chars)
|
||||
# Use python to generate output to avoid command line length limits
|
||||
result = await tool.execute(
|
||||
command="python -c \"print('A' * 6000 + '\\n' + 'B' * 6000)\""
|
||||
)
|
||||
assert "chars truncated" in result
|
||||
# Head portion should start with As
|
||||
assert result.startswith("A")
|
||||
|
||||
Reference in New Issue
Block a user