PytestΒΆ
Important
For these helpers to work, you need to install click_extraβs additional dependencies from the pytest extra group:
$ pip install click_extra[pytest]
Utility functionsΒΆ
Todo
Write example and tutorial.
FixturesΒΆ
Todo
Write example and tutorial.
click_extra.pytest APIΒΆ
Pytest fixtures and marks to help testing Click CLIs.
- click_extra.pytest.runner()[source]ΒΆ
Runner fixture for
click_extra.testing.CliRunner.
- click_extra.pytest.invoke(runner)[source]ΒΆ
Invoke fixture shorthand for
click_extra.testing.CliRunner.invoke().
- click_extra.pytest.command_decorators(no_commands=False, no_groups=False, no_click=False, no_cloup=False, no_extra=False, with_parenthesis=True, with_types=False)[source]ΒΆ
Returns collection of Pytest parameters to test all command-like decorators.
- Return type:
- Returns:
Pytest parameters covering each command-like decorator variant:
click.commandclick.command()cloup.commandcloup.command()click_extra.commandclick_extra.command()click.groupclick.group()cloup.groupcloup.group()click_extra.groupclick_extra.group()
- click_extra.pytest.option_decorators(no_options=False, no_arguments=False, no_click=False, no_cloup=False, no_extra=False, with_parenthesis=True, with_types=False)[source]ΒΆ
Returns collection of Pytest parameters to test all parameter-like decorators.
- Return type:
- Returns:
Pytest parameters covering each parameter-like decorator variant:
click.optionclick.option()cloup.optioncloup.option()click_extra.optionclick_extra.option()click.argumentclick.argument()cloup.argumentcloup.argument()click_extra.argumentclick_extra.argument()