Skip to content
Myr

Test for help exception on option with multiple, show_default and list default

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

authored by Ulrich Petri · committed by Ulrich Petri · parent 308cc08 · Browse files · 1 file+15 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+15 added−0 removed

  • tests:+15 added−0 removed

1 file+15 added−0 removed

modified:tests/test_options.py+15 added
113 unmodified lines
114 assert not result.exception115 assert result.output == 'foo|bar\n'116117118def test_multiple_default_help(runner):119 @click.command()120 @click.option("--arg1", multiple=True, default=('foo', 'bar'),121 show_default=True)122 @click.option("--arg2", multiple=True, default=(1, 2), type=int,123 show_default=True)124 def cmd(arg, arg2):125 pass126127 result = runner.invoke(cmd, ['--help'])128 assert not result.exception129 assert "foo, bar" in result.output130 assert "1, 2" in result.output131132133def test_nargs_envvar(runner):134 @click.command()135 @click.option('--arg', nargs=2)136 def cmd(arg):
98 unmodified lines