From b0de834e0f5ef178ff11539cd667d2b0f4da9921 Mon Sep 17 00:00:00 2001 From: Alberto Madonna Date: Fri, 6 Oct 2023 14:14:52 +0200 Subject: [PATCH] Improved reporting for integration tests about error messages --- CI/src/common/util.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CI/src/common/util.py b/CI/src/common/util.py index 6062a79e..51a244e6 100644 --- a/CI/src/common/util.py +++ b/CI/src/common/util.py @@ -264,7 +264,9 @@ def get_sarus_error_output(command, fail_expected=True): def assert_sarus_raises_error_containing_text(command, text): sarus_output = get_sarus_error_output(command) - assert text in sarus_output, 'Sarus generated an error, but it did not contain the expected text "{}".'.format(text) + assert text in sarus_output, ('Sarus generated an error, but it did not contain the expected text.\n' + 'Generated message: {}\n' + 'Expected: {}'.format(sarus_output, text)) def modify_sarus_json(new_parameters):