def test_multiline_docstring_indented_correctly(self): """ display_command() should properly indent docstr for old style task methods """ def mytask(arg1): """ This is a multi line docstring. For reals. """ try: with patched_context(fabric.state, 'commands', {'mytask': mytask}): display_command('mytask') except SystemExit: # ugh pass eq_( sys.stdout.getvalue(), """Displaying detailed information for task 'mytask': This is a multi line docstring. For reals. Arguments: arg1 """ )
def ajuda(comando=None): """ Exibe a ajuda para um comando "fab ajuda:nome". * comando: Nome do comando """ if comando is None: show_commands(__doc__, 'normal') else: display_command(comando)