module exclusive_scheduling
pytest-xdist scheduler that runs some tests on dedicated workers.
Can significantly improve runtime by running long tests on separate workers.
class ExclusiveScheduling
Custom xdist scheduling.
Run tests from exclusive_tests.txt on separate xdist nodes.
method __init__
__init__(config: Any, log: Any) → None
Load tests from exclusive_tests.txt.
property collection_is_completed
Boolean indication initial test collection is complete.
This is a boolean indicating all initial participating nodes have finished collection. The required number of initial nodes is defined by .numnodes.
property exclusive_tests_indices
Map exclusive test names to indices.
At init tests are not collected so we do lazy initialization. Calculate at first access and use cache afterward.
property has_pending
Return True if there are pending test items
This indicates that collection has finished and nodes are still processing test items, so this can be thought of as "the scheduler is active".
property nodes
A list of all nodes in the scheduler.
property tests_finished
Return True if all tests have been executed by the nodes.
method load_exclusive_tests
load_exclusive_tests(
filename: str = 'tests/resources/exclusive_tests.txt'
) → list[str]
Load tests from exclusive_tests.txt.
method trace
trace(*message: str) → None
Print a message with a timestamp.
This file was automatically generated via lazydocs.