When step decorator. :param name: Step name or a parser object. :param converters: Optional `dict` of the argument or parameter converters in form { : }. :param target_fixture: Target fixture name to replace by steps definition funct
(
name: str | StepParser,
converters: dict[str, Callable[[str], Any]] | None = None,
target_fixture: str | None = None,
stacklevel: int = 1,
)
| 95 | |
| 96 | |
| 97 | def when( |
| 98 | name: str | StepParser, |
| 99 | converters: dict[str, Callable[[str], Any]] | None = None, |
| 100 | target_fixture: str | None = None, |
| 101 | stacklevel: int = 1, |
| 102 | ) -> Callable[[Callable[P, T]], Callable[P, T]]: |
| 103 | """When step decorator. |
| 104 | |
| 105 | :param name: Step name or a parser object. |
| 106 | :param converters: Optional `dict` of the argument or parameter converters in form |
| 107 | {<param_name>: <converter function>}. |
| 108 | :param target_fixture: Target fixture name to replace by steps definition function. |
| 109 | :param stacklevel: Stack level to find the caller frame. This is used when injecting the step definition fixture. |
| 110 | |
| 111 | :return: Decorator function for the step. |
| 112 | """ |
| 113 | return step(name, WHEN, converters=converters, target_fixture=target_fixture, stacklevel=stacklevel) |
| 114 | |
| 115 | |
| 116 | def then( |
nothing calls this directly
no test coverage detected
searching dependent graphs…