diff options
| author | KP <kporangehat@gmail.com> | 2019-05-06 12:57:22 -0400 |
|---|---|---|
| committer | David Lord <davidism@gmail.com> | 2020-02-16 17:40:15 -0800 |
| commit | c7bd8d47b44816c2999a12a0b4e52162e5c6994a (patch) | |
| tree | fc09074495e2db19760ec963d525915ff0d800a0 /tests | |
| parent | 7817ae6701767a73c608e00874115cb409591f8b (diff) | |
| download | click-c7bd8d47b44816c2999a12a0b4e52162e5c6994a.tar.gz | |
allow bool type with bool flags
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test_options.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/test_options.py b/tests/test_options.py index 65eea83..896b286 100644 --- a/tests/test_options.py +++ b/tests/test_options.py @@ -463,6 +463,16 @@ def test_option_custom_class_reusable(runner): assert 'you wont see me' not in result.output +def test_bool_flag_with_type(runner): + @click.command() + @click.option('--shout/--no-shout', default=False, type=bool) + def cmd(shout): + pass + + result = runner.invoke(cmd) + assert not result.exception + + def test_aliases_for_flags(runner): @click.command() @click.option('--warnings/--no-warnings', ' /-W', default=True) |
