Remove deprecated pytest_warning_captured hook

This commit is contained in:
Ran Benita
2021-12-07 22:00:31 +02:00
parent 0b0e2d2dbb
commit 41d8fb09ca
7 changed files with 17 additions and 72 deletions

View File

@@ -1330,14 +1330,6 @@ class Config:
if records:
frame = sys._getframe(stacklevel - 1)
location = frame.f_code.co_filename, frame.f_lineno, frame.f_code.co_name
self.hook.pytest_warning_captured.call_historic(
kwargs=dict(
warning_message=records[0],
when="config",
item=None,
location=location,
)
)
self.hook.pytest_warning_recorded.call_historic(
kwargs=dict(
warning_message=records[0],