MCPcopy Create free account
hub / github.com/pytest-dev/pytest-bdd / then

Function then

src/pytest_bdd/steps.py:116–132  ·  view source on GitHub ↗

Then 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,
)

Source from the content-addressed store, hash-verified

114
115
116def then(
117 name: str | StepParser,
118 converters: dict[str, Callable[[str], Any]] | None = None,
119 target_fixture: str | None = None,
120 stacklevel: int = 1,
121) -> Callable[[Callable[P, T]], Callable[P, T]]:
122 """Then step decorator.
123
124 :param name: Step name or a parser object.
125 :param converters: Optional `dict` of the argument or parameter converters in form
126 {<param_name>: <converter function>}.
127 :param target_fixture: Target fixture name to replace by steps definition function.
128 :param stacklevel: Stack level to find the caller frame. This is used when injecting the step definition fixture.
129
130 :return: Decorator function for the step.
131 """
132 return step(name, THEN, converters=converters, target_fixture=target_fixture, stacklevel=stacklevel)
133
134
135def step(

Callers

nothing calls this directly

Calls 1

stepFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…