Prepare for the removal of pytest_logwarning in pytest 4.1

This commit is contained in:
Bruno Oliveira
2018-12-11 18:46:30 -02:00
parent c5d8635294
commit a30124e858

View File

@@ -115,6 +115,9 @@ class WorkerInteractor(object):
data = serialize_report(report)
self.sendevent("collectreport", data=data)
# the pytest_logwarning hook was removed in pytest 4.1
if hasattr(_pytest.hookspec, "pytest_logwarning"):
def pytest_logwarning(self, message, code, nodeid, fslocation):
self.sendevent(
"logwarning",