@@ -247,6 +247,11 @@ class DSession:
|
||||
if rep.failed:
|
||||
self._failed_slave_collectreport(node, rep)
|
||||
|
||||
def slave_logwarning(self, message, code, nodeid, fslocation):
|
||||
"""Emitted when a node calls the pytest_logwarning hook."""
|
||||
kwargs = dict(message=message, code=code, nodeid=nodeid, fslocation=fslocation)
|
||||
self.config.hook.pytest_logwarning.call_historic(kwargs=kwargs)
|
||||
|
||||
def _clone_node(self, node):
|
||||
"""Return new node based on an existing one.
|
||||
|
||||
|
||||
@@ -96,6 +96,9 @@ class SlaveInteractor:
|
||||
data = serialize_report(report)
|
||||
self.sendevent("collectreport", data=data)
|
||||
|
||||
def pytest_logwarning(self, message, code, nodeid, fslocation):
|
||||
self.sendevent("logwarning", message=message, code=code, nodeid=nodeid, fslocation=fslocation)
|
||||
|
||||
|
||||
def serialize_report(rep):
|
||||
def disassembled_report(rep):
|
||||
|
||||
@@ -315,6 +315,10 @@ class SlaveController(object):
|
||||
self.notify_inproc(eventname, node=self, rep=rep)
|
||||
elif eventname == "collectionfinish":
|
||||
self.notify_inproc(eventname, node=self, ids=kwargs['ids'])
|
||||
elif eventname == "logwarning":
|
||||
self.notify_inproc(eventname, message=kwargs['message'],
|
||||
code=kwargs['code'], nodeid=kwargs['nodeid'],
|
||||
fslocation=kwargs['nodeid'])
|
||||
else:
|
||||
raise ValueError("unknown event: %s" % (eventname,))
|
||||
except KeyboardInterrupt:
|
||||
|
||||
Reference in New Issue
Block a user