MCPcopy Create free account
hub / github.com/MiniMax-AI/Mini-Agent / test_timeout_validation

Function test_timeout_validation

tests/test_bash_tool.py:258–272  ·  view source on GitHub ↗

Test timeout parameter validation.

()

Source from the content-addressed store, hash-verified

256
257@pytest.mark.asyncio
258async 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")

Callers

nothing calls this directly

Calls 2

executeMethod · 0.95
BashToolClass · 0.90

Tested by

no test coverage detected