Use pytest_xdist_make_scheduler hook to set up scheduller instance
This commit is contained in:
@@ -11,6 +11,7 @@ must be taken in plugins in case ``xdist`` is not installed. Please see:
|
||||
|
||||
http://pytest.org/latest/writing_plugins.html#optionally-using-hooks-from-3rd-party-plugins
|
||||
"""
|
||||
import pytest
|
||||
|
||||
|
||||
def pytest_xdist_setupnodes(config, specs):
|
||||
@@ -44,3 +45,9 @@ def pytest_testnodedown(node, error):
|
||||
def pytest_xdist_node_collection_finished(node, ids):
|
||||
"""called by the master node when a node finishes collecting.
|
||||
"""
|
||||
|
||||
|
||||
@pytest.hookspec(firstresult=True)
|
||||
def pytest_xdist_make_scheduler(numnodes, log, config):
|
||||
"""Return a node scheduler implementation, or None.
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user