Pytest utilities and fixtures¶
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]
Todo
Write example and tutorial.
click_extra.pytest
API¶
Pytest fixtures and marks to help testing Click CLIs.
- click_extra.pytest.invoke(extra_runner)[source]¶
Invoke fixture shorthand for
click.testing.ExtraCliRunner.invoke
.
- click_extra.pytest.skip_naked(*args, **kwargs) = MarkDecorator(mark=Mark(name='skip', args=(), kwargs={'reason': 'Naked decorator not supported yet.'}))¶
Mark to skip Cloup decorators without parenthesis.
- click_extra.pytest.command_decorators(no_commands=False, no_groups=False, no_click=False, no_cloup=False, no_redefined=False, no_extra=False, with_parenthesis=True, with_types=False)[source]¶
Returns collection of Pytest parameters to test all forms of click/cloup/click- extra command-like decorators.