Test command that fails with non-zero exit code.
()
| 38 | |
| 39 | @pytest.mark.asyncio |
| 40 | async def test_command_failure(): |
| 41 | """Test command that fails with non-zero exit code.""" |
| 42 | print("\n=== Testing Command Failure ===") |
| 43 | |
| 44 | bash_tool = BashTool() |
| 45 | result = await bash_tool.execute(command="ls /nonexistent_directory_12345") |
| 46 | |
| 47 | assert not result.success |
| 48 | assert result.exit_code != 0 |
| 49 | assert result.error is not None |
| 50 | print(f"Error: {result.error}") |
| 51 | |
| 52 | |
| 53 | @pytest.mark.asyncio |