Skip to content
Myr

Added a test for empty nargs

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

authored by Armin Ronacher · committed by Armin Ronacher · parent 61e5a16 · Browse files · 1 file+11 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+11 added−0 removed

  • tests:+11 added−0 removed

1 file+11 added−0 removed

modified:tests/test_arguments.py+11 added
123 unmodified lines
124 assert not result.exception125 assert result.output == 'foo|bar\n'126127128def test_empty_nargs(runner):129 @click.command()130 @click.option('--arg', nargs=-1)131 def cmd(arg):132 click.echo('arg:' + '|'.join(arg))133134 result = runner.invoke(cmd, [])135 assert result.exit_code == 0136 assert result.output == 'arg:\n'137138139def test_eat_options(runner):140 @click.command()141 @click.option('-f')142 @click.argument('files', nargs=-1)
18 unmodified lines