Open Phlogistique opened 4 years ago
Hi @Phlogistique, I'm not sure how to help you here, since there are no steps to reproduce the issue.
While I'm not able to reproduce this, I agree get_caller_module
looks weird. If module
was None
, why would calling the function again with the exact same arguments change anything?
A colleague has experienced the same problem on his machine. Like for me, the problem disappeared when re-installing pytest_bdd.
Would you accept a patch to get_caller_module
that tries to fix this?
@Phlogistique yes
When calling
pytest --help
I get the following backtrace:Workarounds
python -m pytest --help
workspip uninstall pytest_bdd && pip install pytest_bdd
fixed the problem on my machineHow to reproduce
Sorry, I do not have a proper reproduction scenario.
Here is the output of
pip freeze | grep pytest
:Investigation
The function
get_caller_module
does look fishy to me:To me it looks like it's trying to loop towards the outermost stackframe, but forgets to change
depth
and therefore loops recursively towards the innermost stackframe, until triggering a recursion error.