From 753f9241a760495117876a9affece7a555cc27bb Mon Sep 17 00:00:00 2001 From: Michael Elovskikh Date: Mon, 10 Oct 2016 21:07:31 +0500 Subject: [PATCH] Support older pytest versions --- xdist/dsession.py | 2 +- xdist/newhooks.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/xdist/dsession.py b/xdist/dsession.py index 7f03326..3ae2e03 100644 --- a/xdist/dsession.py +++ b/xdist/dsession.py @@ -521,7 +521,7 @@ class DSession: # prohibit collection of test items in master process return True - @pytest.hookimpl(trylast=True) + @pytest.mark.trylast def pytest_xdist_make_scheduler(self, numnodes, log, config): dist = config.getvalue("dist") if dist == "load": diff --git a/xdist/newhooks.py b/xdist/newhooks.py index 5942f29..5bffa7b 100644 --- a/xdist/newhooks.py +++ b/xdist/newhooks.py @@ -47,7 +47,7 @@ def pytest_xdist_node_collection_finished(node, ids): """ -@pytest.hookspec(firstresult=True) +@pytest.mark.firstresult def pytest_xdist_make_scheduler(numnodes, log, config): """Return a node scheduler implementation, or None. """