'Verifies that the first sentence of a docstring is extracted as the short description.
Verifies that line breaks in the long summary are removed and leaves the text wrapping
to the help system.'

@redirect_io
def test_help_long_description_from_docstring(self):

    def test_handler():
        'Short    Description.    Long    description    with\nline    break.'
        pass
    setattr(sys.modules[__name__], test_handler.__name__, test_handler)
    cli_command(None, 'test', '{}#{}'.format(__name__, test_handler.__name__))
    _update_command_definitions(command_table)
    config = Configuration()
    app = Application(config)
    with self.assertRaises(SystemExit):
        app.execute('test    -h'.split())
    self.assertEqual(True, io.getvalue().startswith('\nCommand\n                az    test:    Short    Description.\n                                Long    description    with    line    break.'))
