(subsection_comment)
| 181 | |
| 182 | |
| 183 | def parse_runtime_profile_table_formats(subsection_comment): |
| 184 | prefix = "table_format=" |
| 185 | if not subsection_comment.startswith(prefix): |
| 186 | raise RuntimeError('RUNTIME_PROFILE comment (%s) must be of the form ' |
| 187 | '"table_format=FORMAT[,FORMAT2,...]"' % subsection_comment) |
| 188 | |
| 189 | parsed_formats = subsection_comment[len(prefix):].split(',') |
| 190 | table_formats = list() |
| 191 | for table_format in parsed_formats: |
| 192 | if table_format not in ALLOWED_TABLE_FORMATS: |
| 193 | raise RuntimeError('RUNTIME_PROFILE table format (%s) must be in: %s' % |
| 194 | (table_format, ALLOWED_TABLE_FORMATS)) |
| 195 | else: |
| 196 | table_formats.append(table_format) |
| 197 | return table_formats |
| 198 | |
| 199 | |
| 200 | def parse_test_file_text(text, valid_section_names, skip_unknown_sections=True): |
no test coverage detected