Build a ProjectFile-mode project with `dataset_count` plot datasets and the given parser installed.
(
api_client,
parser_code: str,
parser_language: int,
dataset_count: int = 1,
)
| 40 | |
| 41 | |
| 42 | def _setup_project( |
| 43 | api_client, |
| 44 | parser_code: str, |
| 45 | parser_language: int, |
| 46 | dataset_count: int = 1, |
| 47 | ) -> None: |
| 48 | """ |
| 49 | Build a ProjectFile-mode project with `dataset_count` plot datasets and |
| 50 | the given parser installed. |
| 51 | """ |
| 52 | api_client.create_new_project() |
| 53 | time.sleep(0.2) |
| 54 | |
| 55 | gid = api_client.add_group("G", widget_type=0) |
| 56 | for _ in range(dataset_count): |
| 57 | api_client.add_dataset(gid, options=1) |
| 58 | |
| 59 | api_client.set_operation_mode("project") |
| 60 | api_client.configure_frame_parser( |
| 61 | start_sequence="/*", |
| 62 | end_sequence="*/", |
| 63 | checksum_algorithm="", |
| 64 | frame_detection=1, |
| 65 | operation_mode=0, |
| 66 | ) |
| 67 | |
| 68 | api_client.set_frame_parser_code(parser_code, language=parser_language, source_id=0) |
| 69 | time.sleep(0.15) |
| 70 | |
| 71 | |
| 72 | def _set_transform(api_client, group_id: int, dataset_id: int, code: str) -> None: |
no test coverage detected