Remove pytest 2.8 compatibility code

This commit is contained in:
Bruno Oliveira
2019-07-10 20:02:36 -03:00
committed by Bruno Oliveira
parent a19d74d5fe
commit 2ca058e38a
2 changed files with 11 additions and 24 deletions

View File

@@ -154,11 +154,7 @@ def pytest_addoption(parser):
def pytest_addhooks(pluginmanager):
from xdist import newhooks
# avoid warnings with pytest-2.8
method = getattr(pluginmanager, "add_hookspecs", None)
if method is None:
method = pluginmanager.addhooks
method(newhooks)
pluginmanager.add_hookspecs(newhooks)
# -------------------------------------------------------------------------