Skip to content

Commit 9af673c

Browse files
author
Ludovic CHAPELET
committed
chore: replace return None by error
1 parent dda477a commit 9af673c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/pytest_bdd/parser.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ def find_scenario_example_from_context(self, context: Mapping[str, object]) -> E
238238
example_param = dict(zip(example.example_params, example.examples[0]))
239239
if example_param == context:
240240
return example
241-
return None
241+
raise ValueError("No matching example found for the given context.")
242242

243243

244244
@dataclass(eq=False)

0 commit comments

Comments
 (0)