Fix warnings transfer between workers and master node with pytest >= 3.8

Fix #341
This commit is contained in:
Bruno Oliveira
2018-09-24 14:58:13 -03:00
parent ed2ab76b5c
commit 78030e3d32
8 changed files with 97 additions and 3 deletions

View File

@@ -270,6 +270,11 @@ class DSession(object):
kwargs = dict(message=message, code=code, nodeid=nodeid, fslocation=fslocation)
self.config.hook.pytest_logwarning.call_historic(kwargs=kwargs)
def worker_warning_captured(self, warning_message, when, item):
"""Emitted when a node calls the pytest_logwarning hook."""
kwargs = dict(warning_message=warning_message, when=when, item=item)
self.config.hook.pytest_warning_captured.call_historic(kwargs=kwargs)
def _clone_node(self, node):
"""Return new node based on an existing one.