From bc0a61574c945157b9a63b41f5cf7e971b58b07a Mon Sep 17 00:00:00 2001 From: Pierre Sassoulas Date: Thu, 18 Aug 2022 10:18:41 +0200 Subject: [PATCH] Make text message for test_normalization give the command used --- survey/tests/locale/test_locale_normalization.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/survey/tests/locale/test_locale_normalization.py b/survey/tests/locale/test_locale_normalization.py index 0387846f..c26177d7 100644 --- a/survey/tests/locale/test_locale_normalization.py +++ b/survey/tests/locale/test_locale_normalization.py @@ -38,10 +38,12 @@ def test_normalization(self): git_diff = subprocess.check_output(git_diff_command).decode("utf8") # In the diff we should have a change only for the date of the generation # So 2 * @@ * number of language + command_as_str = " ".join(makemessages_command) number_of_change = git_diff.count("@@") / 2 msg = ( "You did not update the translation following your changes. Maybe you did not use the " "normalized 'python3 manage.py makemessages --no-obsolete --no-wrap' ? If you're " - "working locally, just use 'git add {}', we launched it during tests.".format(self.LOCALE_PATH), + f"working locally, just use 'git add {self.LOCALE_PATH}', we launched " + f"'{command_as_str}' during tests.", ) self.assertEqual(number_of_change, number_of_language, msg)