Remove pytest 2.8 compatibility code (#451)

Remove pytest 2.8 compatibility code
This commit is contained in:
Bruno Oliveira
2019-07-11 08:11:37 -03:00
committed by GitHub
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)
# -------------------------------------------------------------------------