Drop features from old pytest versions

This commit is contained in:
Bruno Oliveira
2020-08-05 19:45:08 -03:00
parent 56a852665d
commit 047816f33a
3 changed files with 3 additions and 64 deletions

View File

@@ -125,20 +125,6 @@ class WorkerInteractor:
)
self.sendevent("collectreport", data=data)
# the pytest_logwarning hook was deprecated since pytest 4.0
if hasattr(
_pytest.hookspec, "pytest_logwarning"
) and not _pytest.hookspec.pytest_logwarning.pytest_spec.get("warn_on_impl"):
def pytest_logwarning(self, message, code, nodeid, fslocation):
self.sendevent(
"logwarning",
message=message,
code=code,
nodeid=nodeid,
fslocation=str(fslocation),
)
# the pytest_warning_recorded hook was introduced in pytest 6.0
if hasattr(_pytest.hookspec, "pytest_warning_recorded"):