MCPcopy Create free account
hub / github.com/pytest-dev/pytest-xdist / MockNode

Class MockNode

testing/test_dsession.py:37–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35
36
37class MockNode(BaseOfMockNode):
38 def __init__(self) -> None:
39 self.sent: list[int | str] = []
40 self.stolen: list[int] = []
41 self.gateway = MockGateway()
42 self._shutdown = False
43
44 def send_runtest_some(self, indices: Sequence[int]) -> None:
45 self.sent.extend(indices)
46
47 def send_runtest_all(self) -> None:
48 self.sent.append("ALL")
49
50 def send_steal(self, indices: Sequence[int]) -> None:
51 self.stolen.extend(indices)
52
53 def shutdown(self) -> None:
54 self._shutdown = True
55
56 @property
57 def shutting_down(self) -> bool:
58 return self._shutdown
59
60
61class TestEachScheduling:

Calls

no outgoing calls

Used in the wild real call sites across dependent graphs

searching dependent graphs…