From bc202195afe9776698236bf9c7b73aedd14944ed Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Mon, 20 Jun 2022 13:03:30 +0100 Subject: [PATCH] tests: Add test for boolean options This was missing, weirdly. Make sure we don't regress. Signed-off-by: Stephen Finucane --- tests/test_formatter.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/test_formatter.py b/tests/test_formatter.py index c413ee9..faf940d 100644 --- a/tests/test_formatter.py +++ b/tests/test_formatter.py @@ -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.""" @@ -102,6 +107,10 @@ def foobar(bar): :options: 1 | 2 | 3 + .. option:: --flag + + A boolean flag + .. rubric:: Arguments .. option:: ARG