Skip to content

Commit

Permalink
Enabled test for issue click-contrib#17
Browse files Browse the repository at this point in the history
  • Loading branch information
edobezabb committed May 8, 2021
1 parent 0ced30d commit b225a34
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions test.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,13 @@ def test_default_command_with_arguments(cli_group_with_default: DefaultGroup):
assert 'no such option' in r.invoke(cli_group_with_default, ['-x']).output

def test_group_arguments(cli_group_with_default: DefaultGroup):
cli_group_with_default.invoke_without_command = True
assert r.invoke(cli_group_with_default, ['--verbose']).output == 'Verbose!\n'

assert 'Error: Missing command' in r.invoke(cli_group_with_default, ['--verbose']).output

# def test_group_arguments_call_default(cli_group):
# assert r.invoke(cli_group, ['--verbose']).output == '--verbose passed.\nbaz called.\n'
cli_group_with_default.invoke_without_command = True
assert r.invoke(cli_group_with_default, ['--verbose']).output == 'Verbose!\nfoo exec\n'

cli_group_with_default.default_if_no_args = False
assert r.invoke(cli_group_with_default, ['--verbose']).output == 'Verbose!\n'

def test_set_ignore_unknown_options_to_false():
with pytest.raises(ValueError):
Expand All @@ -73,7 +73,6 @@ def test_format_commands(cli_group_with_default: DefaultGroup):
assert 'bar*' not in help
assert 'bar' in help


def test_deprecation():
# @cli.command(default=True) has been deprecated since 1.2.
cli = DefaultGroup()
Expand Down

0 comments on commit b225a34

Please sign in to comment.