Skip to content

Commit c7951a4

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent db90668 commit c7951a4

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

src/pytest_bdd/scenario.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ def _execute_step_function(
167167
inject_fixture(request=request, arg=arg, value=return_value)
168168
else:
169169
target_fixture_tokens = [token for token in context.target_fixture.split(",") if token]
170-
# Single return value in target_fixture
170+
# Single return value in target_fixture
171171
if len(target_fixture_tokens) == 1:
172172
inject_fixture(request=request, arg=target_fixture_tokens[0], value=return_value)
173173
# Multiple comma separated return values in target_fixture

src/pytest_bdd/steps.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,14 @@ def when(
111111
112112
:return: Decorator function for the step.
113113
"""
114-
return step(name, WHEN, converters=converters, target_fixture=target_fixture, target_exception=target_exception, stacklevel=stacklevel)
114+
return step(
115+
name,
116+
WHEN,
117+
converters=converters,
118+
target_fixture=target_fixture,
119+
target_exception=target_exception,
120+
stacklevel=stacklevel,
121+
)
115122

116123

117124
def then(

tests/feature/test_steps.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@ def test_when_exception(pytester):
609609
@scenario("when_exception.feature", "Test when exception is generated")
610610
def test_when_exception():
611611
pass
612-
612+
613613
@when("I have injected exception", target_fixture="foo")
614614
def _():
615615
return Exception("Dummy Exception obj")

0 commit comments

Comments
 (0)