MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / _multi_group_project

Function _multi_group_project

tests/integration/test_window_layout.py:46–82  ·  view source on GitHub ↗

n_groups independent groups, each with 3 plot datasets. This guarantees the taskbar shows multiple group tabs so that group-switch tests are not skipped.

(title="WL-Multi", n_groups=3)

Source from the content-addressed store, hash-verified

44
45
46def _multi_group_project(title="WL-Multi", n_groups=3) -> dict:
47 """
48 n_groups independent groups, each with 3 plot datasets.
49 This guarantees the taskbar shows multiple group tabs so that
50 group-switch tests are not skipped.
51 """
52 groups = []
53 for g in range(n_groups):
54 groups.append(
55 {
56 "title": f"Group {g}",
57 "widget": "datagrid",
58 "datasets": [
59 {"title": f"G{g}D{d}", "graph": True, "units": "", "value": "0"}
60 for d in range(3)
61 ],
62 }
63 )
64
65 return {
66 "title": title,
67 "sources": [
68 {
69 "sourceId": 0,
70 "title": "Device",
71 "busType": 0,
72 "frameStart": "/*",
73 "frameEnd": "*/",
74 "frameDetection": 1,
75 "checksum": "",
76 "decoder": 0,
77 "hexadecimalDelimiters": False,
78 "frameParserCode": DataGenerator.CSV_PARSER_TEMPLATE,
79 }
80 ],
81 "groups": groups,
82 }
83
84
85def _write_project(path: Path, project: dict) -> Path:

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected