Skip to content

Commit c489af3

Browse files
author
Philipp Loose
committed
Add docstring for new 'frame' parameter in pytest_warning_captured hook
1 parent e2a2e13 commit c489af3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/_pytest/hookspec.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -597,6 +597,10 @@ def pytest_warning_captured(warning_message, when, item, frame):
597597
in a future release.
598598
599599
The item being executed if ``when`` is ``"runtest"``, otherwise ``None``.
600+
601+
:param types.FrameType frame:
602+
The stackframe in which the captured warning occured. This is helpful to inspect the context
603+
in which the warning was emitted.
600604
"""
601605

602606

0 commit comments

Comments
 (0)