-
Notifications
You must be signed in to change notification settings - Fork 235
/
Copy pathprotocol.py
49 lines (34 loc) · 1.1 KB
/
protocol.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
from __future__ import annotations
from typing import Protocol
from typing import Sequence
from xdist.workermanage import WorkerController
class Scheduling(Protocol):
@property
def nodes(self) -> list[WorkerController]: ...
@property
def collection_is_completed(self) -> bool: ...
@property
def tests_finished(self) -> bool: ...
@property
def has_pending(self) -> bool: ...
def add_node(self, node: WorkerController) -> None: ...
def add_node_collection(
self,
node: WorkerController,
collection: Sequence[str],
) -> None: ...
def set_group_markers(self, group_markers: dict[str, str]) -> None: ...
def mark_test_complete(
self,
node: WorkerController,
item_index: int,
duration: float = 0,
) -> None: ...
def mark_test_pending(self, item: str) -> None: ...
def remove_pending_tests_from_node(
self,
node: WorkerController,
indices: Sequence[int],
) -> None: ...
def remove_node(self, node: WorkerController) -> str | None: ...
def schedule(self) -> None: ...