Test timeout parameter validation.
()
| 256 | |
| 257 | @pytest.mark.asyncio |
| 258 | async def test_timeout_validation(): |
| 259 | """Test timeout parameter validation.""" |
| 260 | print("\n=== Testing Timeout Validation ===") |
| 261 | |
| 262 | bash_tool = BashTool() |
| 263 | |
| 264 | # Test with timeout > 600 (should be capped to 600) |
| 265 | result = await bash_tool.execute(command="echo 'test'", timeout=1000) |
| 266 | assert result.success |
| 267 | print("Timeout > 600 handled correctly") |
| 268 | |
| 269 | # Test with timeout < 1 (should be set to 120) |
| 270 | result = await bash_tool.execute(command="echo 'test'", timeout=0) |
| 271 | assert result.success |
| 272 | print("Timeout < 1 handled correctly") |