From fb5d80042d64e1c839977257b303e90380fe4b11 Mon Sep 17 00:00:00 2001 From: Alessio Bogon <778703+youtux@users.noreply.github.com> Date: Sat, 2 Dec 2023 23:21:27 +0100 Subject: [PATCH] Add todo --- src/pytest_bdd/scenario.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pytest_bdd/scenario.py b/src/pytest_bdd/scenario.py index 72005063..40676552 100644 --- a/src/pytest_bdd/scenario.py +++ b/src/pytest_bdd/scenario.py @@ -237,6 +237,8 @@ def scenario_wrapper(request: FixtureRequest, _pytest_bdd_example: dict[str, str config.hook.pytest_bdd_apply_tag(tag=tag, function=scenario_wrapper) scenario_wrapper.__doc__ = f"{feature_name}: {scenario_name}" + + # TODO: Use a WeakKeyDictionary to store the scenario object instead of attaching it to the function scenario_wrapper.__scenario__ = templated_scenario return cast(Callable[P, T], scenario_wrapper)