Skip to content
Myr

Add failing test for formatting

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Simon Jagoe · committed by Simon Jagoe · parent 308cc08 · Browse files · 1 file+34 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+34 added−0 removed

  • tests:+34 added−0 removed

1 file+34 added−0 removed

modified:tests/test_formatting.py+34 added
46 unmodified lines
47 '',48 'Options:',49 ' --help Show this message and exit.',50 ]515253def test_wrapping_long_options_strings(runner):54 @click.group()55 def cli():56 """Top level command57 """5859 @cli.group()60 def a_very_long():61 """Second level62 """6364 @a_very_long.command()65 @click.argument('first')66 @click.argument('second')67 @click.argument('third')68 @click.argument('fourth')69 def command():70 """A command.71 """7273 result = runner.invoke(cli, ['a_very_long', 'command', '--help'],74 terminal_width=54)75 assert not result.exception76 assert result.output.splitlines() == [77 'Usage: cli a_very_long command [OPTIONS] FIRST SECOND',78 ' THIRD FOURTH',79 '',80 ' A command.',81 '',82 'Options:',83 ' --help Show this message and exit.',84 ]