Skip to content

Commit

Permalink
tests: Add test for boolean options
Browse files Browse the repository at this point in the history
This was missing, weirdly. Make sure we don't regress.

Signed-off-by: Stephen Finucane <stephen@that.guru>
  • Loading branch information
stephenfin committed Jun 20, 2022
1 parent 302b655 commit bc20219
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/test_formatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ def test_basic_parameters(self):
help='A sample option with numeric choices',
type=click.Choice([1, 2, 3]),
)
@click.option(
'--flag',
is_flag=True,
help='A boolean flag',
)
@click.argument('ARG', envvar='ARG')
def foobar(bar):
"""A sample command."""
Expand Down Expand Up @@ -102,6 +107,10 @@ def foobar(bar):
:options: 1 | 2 | 3
.. option:: --flag
A boolean flag
.. rubric:: Arguments
.. option:: ARG
Expand Down

0 comments on commit bc20219

Please sign in to comment.