We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cffdf71 commit 9779f96Copy full SHA for 9779f96
pytest_describe/plugin.py
@@ -9,13 +9,13 @@
9
PYTEST_GTE_5_4 = PYTEST_GTE_7_0 or hasattr(pytest.Collector, 'from_parent')
10
11
12
-def trace_function(func, *args, **kwargs): # pragma: no-cover
+def trace_function(func, *args, **kwargs):
13
"""Call a function and return its locals."""
14
f_locals = {}
15
16
def _trace_func(frame, event, arg): # pragma: no cover
17
# Activate local trace for first call only
18
- if (frame.f_back.f_locals.get('_trace_func') == _trace_func
+ if (frame.f_back.f_locals.get('_trace_func') is _trace_func
19
and event == 'return'):
20
f_locals.update(frame.f_locals)
21
0 commit comments