dsession,workermanage: drop handling of pytest_captured_warning

Since d153e0a4c4 the remote doesn't send
events for this hook at all (I think perhaps wrongly, but it's history
by now), so no point in handling it in the coordinator side.
This commit is contained in:
Ran Benita
2024-04-04 16:49:00 +03:00
parent a3b9a98126
commit 5c676aa685
2 changed files with 0 additions and 17 deletions

View File

@@ -317,13 +317,6 @@ class DSession:
assert not rep.passed
self._failed_worker_collectreport(node, rep)
def worker_warning_captured(self, warning_message, when, item):
"""Emitted when a node calls the pytest_warning_captured hook (deprecated in 6.0)."""
# This hook as been removed in pytest 7.1, and we can remove support once we only
# support pytest >=7.1.
kwargs = dict(warning_message=warning_message, when=when, item=item)
self.config.hook.pytest_warning_captured.call_historic(kwargs=kwargs)
def worker_warning_recorded(self, warning_message, when, nodeid, location):
"""Emitted when a node calls the pytest_warning_recorded hook."""
kwargs = dict(

View File

@@ -374,16 +374,6 @@ class WorkerController:
nodeid=kwargs["nodeid"],
fslocation=kwargs["nodeid"],
)
elif eventname == "warning_captured":
warning_message = unserialize_warning_message(
kwargs["warning_message_data"]
)
self.notify_inproc(
eventname,
warning_message=warning_message,
when=kwargs["when"],
item=kwargs["item"],
)
elif eventname == "warning_recorded":
warning_message = unserialize_warning_message(
kwargs["warning_message_data"]