diff --git a/knack/help.py b/knack/help.py index 78570f7..80ccd72 100644 --- a/knack/help.py +++ b/knack/help.py @@ -385,7 +385,7 @@ def _build_long_summary(item): lines.append(str(item.deprecate_info.message)) if item.preview_info: lines.append(str(item.preview_info.message)) - return ' '.join(lines) + return '\n'.join(lines) indent += 1 long_sum = _build_long_summary(help_file) diff --git a/tests/test_deprecation.py b/tests/test_deprecation.py index fc2165b..323f956 100644 --- a/tests/test_deprecation.py +++ b/tests/test_deprecation.py @@ -93,8 +93,9 @@ def test_deprecate_command_help_hidden(self): expected = """ Command {} cmd3 : Short summary here. - Long summary here. Still long summary. This command has been deprecated and will be - removed in a future release. Use 'alt-cmd3' instead. + Long summary here. Still long summary. + This command has been deprecated and will be removed in a future release. Use 'alt- + cmd3' instead. Arguments -b [Required] : Allowed values: a, b, c. @@ -245,9 +246,9 @@ def test_deprecate_command_implicitly(self): expected = """ Command {} group1 cmd1 : Short summary here. - Long summary here. Still long summary. This command is implicitly deprecated because - command group 'group1' is deprecated and will be removed in a future release. Use 'alt- - group1' instead. + Long summary here. Still long summary. + This command is implicitly deprecated because command group 'group1' is deprecated and + will be removed in a future release. Use 'alt-group1' instead. """.format(self.cli_ctx.name) self.assertIn(expected, actual) diff --git a/tests/test_preview.py b/tests/test_preview.py index e70216b..f6e7084 100644 --- a/tests/test_preview.py +++ b/tests/test_preview.py @@ -141,8 +141,9 @@ def test_preview_command_implicitly(self): expected = """ Command {} group1 cmd1 : Short summary here. - Long summary here. Still long summary. Command group 'group1' is in preview. It may be - changed/removed in a future release. + Long summary here. Still long summary. + Command group 'group1' is in preview. It may be changed/removed in a future + release. """.format(self.cli_ctx.name) self.assertIn(expected, actual)