(cmd)
| 54 | |
| 55 | @pytest.mark.parametrize('cmd', ERROR_COMMANDS) |
| 56 | def test_display_error_message(cmd): |
| 57 | result = _aws(cmd, target_rc=254) |
| 58 | assert result.rc == 254 |
| 59 | error_message = re.compile( |
| 60 | r'An error occurred \(.+\) when calling the \w+ operation: \w+' |
| 61 | ) |
| 62 | match = error_message.search(result.stderr) |
| 63 | assert ( |
| 64 | match |
| 65 | ), f'Error message was not displayed for command "{cmd}": {result.stderr}' |