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 78cc24f commit 2dd6fb6Copy full SHA for 2dd6fb6
pytest_timeout.py
@@ -236,8 +236,11 @@ def is_debugging(trace_func=None):
236
return True
237
if trace_func is None:
238
trace_func = sys.gettrace()
239
- if trace_func and inspect.getmodule(trace_func):
240
- parts = inspect.getmodule(trace_func).__name__.split(".")
+ trace_module = None
+ if trace_func:
241
+ trace_module = inspect.getmodule(trace_func) or inspect.getmodule(trace_func.__class__)
242
+ if trace_module:
243
+ parts = trace_module.__name__.split(".")
244
for name in KNOWN_DEBUGGING_MODULES:
245
if any(part.startswith(name) for part in parts):
246
0 commit comments