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)
| 44 | |
| 45 | |
| 46 | def _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 | |
| 85 | def _write_project(path: Path, project: dict) -> Path: |
no test coverage detected