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:
chengyongru
2026-03-14 02:03:15 +08:00
committed by Xubin Ren
parent dbdb43faff
commit 91d95f139e
3 changed files with 14 additions and 7 deletions

View File

@@ -222,8 +222,10 @@ class TestListDirTool:
@pytest.mark.asyncio
async def test_recursive(self, tool, populated_dir):
result = await tool.execute(path=str(populated_dir), recursive=True)
assert "src/main.py" in result
assert "src/utils.py" in result
# Normalize path separators for cross-platform compatibility
normalized = result.replace("\\", "/")
assert "src/main.py" in normalized
assert "src/utils.py" in normalized
assert "README.md" in result
# Ignored dirs should not appear
assert ".git" not in result