(
api_client,
parser_code: str,
parser_language: int,
dataset_count: int = 1,
)
| 102 | |
| 103 | |
| 104 | def _setup_project( |
| 105 | api_client, |
| 106 | parser_code: str, |
| 107 | parser_language: int, |
| 108 | dataset_count: int = 1, |
| 109 | ) -> None: |
| 110 | api_client.create_new_project() |
| 111 | time.sleep(0.2) |
| 112 | |
| 113 | gid = api_client.add_group("G", widget_type=0) |
| 114 | for _ in range(dataset_count): |
| 115 | api_client.add_dataset(gid, options=1) |
| 116 | |
| 117 | api_client.set_operation_mode("project") |
| 118 | api_client.configure_frame_parser( |
| 119 | start_sequence="/*", |
| 120 | end_sequence="*/", |
| 121 | checksum_algorithm="", |
| 122 | frame_detection=1, |
| 123 | operation_mode=0, |
| 124 | ) |
| 125 | api_client.set_frame_parser_code(parser_code, language=parser_language, source_id=0) |
| 126 | time.sleep(0.15) |
| 127 | |
| 128 | |
| 129 | def _set_transform(api_client, group_id: int, dataset_id: int, code: str) -> None: |
no test coverage detected