Test command timeout.
()
| 52 | |
| 53 | @pytest.mark.asyncio |
| 54 | async def test_command_timeout(): |
| 55 | """Test command timeout.""" |
| 56 | print("\n=== Testing Command Timeout ===") |
| 57 | |
| 58 | bash_tool = BashTool() |
| 59 | result = await bash_tool.execute(command="sleep 10", timeout=1) |
| 60 | |
| 61 | assert not result.success |
| 62 | assert "timed out" in result.error.lower() |
| 63 | assert result.exit_code == -1 |
| 64 | print(f"Timeout error: {result.error}") |
| 65 | |
| 66 | |
| 67 | @pytest.mark.asyncio |