You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First I would like to thank all the maintainers for working on this project, it has been very helpful for our organization, thank you.
I am playing with adding intermediate decorators and wrappers for the step_type functions (when, then, and given) to improve convenience but if I call them from a function inside the steps.py, the step function is not found because the stack frame retrieved by sys._getframe is not the one for the module steps.py which is where the fixtures (and thereby steps) are looked for, so the step gets added to the incorrect f_locals (the function I am calling the step_type from). I was wondering if there is any plan to open up the depth option to be more accessable for situations like this? Or, better yet, maybe avoid this mechanism all together (maybe find the module steps.py some other way).
Hello,
First I would like to thank all the maintainers for working on this project, it has been very helpful for our organization, thank you.
I am playing with adding intermediate decorators and wrappers for the step_type functions (
when
,then
, andgiven
) to improve convenience but if I call them from a function inside thesteps.py
, the step function is not found because the stack frame retrieved bysys._getframe
is not the one for the modulesteps.py
which is where the fixtures (and thereby steps) are looked for, so the step gets added to the incorrectf_locals
(the function I am calling the step_type from). I was wondering if there is any plan to open up thedepth
option to be more accessable for situations like this? Or, better yet, maybe avoid this mechanism all together (maybe find the modulesteps.py
some other way).Thanks
pytest-bdd/pytest_bdd/steps.py
Line 132 in 048da9e
The text was updated successfully, but these errors were encountered: