Parsed test caseitem. An item is of the form [id arg] .. data ..
| 435 | |
| 436 | @dataclass |
| 437 | class TestItem: |
| 438 | """Parsed test caseitem. |
| 439 | |
| 440 | An item is of the form |
| 441 | [id arg] |
| 442 | .. data .. |
| 443 | """ |
| 444 | |
| 445 | id: str |
| 446 | arg: str | None |
| 447 | # Processed, collapsed text data |
| 448 | data: list[str] |
| 449 | # Start line: 1-based, inclusive, relative to testcase |
| 450 | line: int |
| 451 | # End line: 1-based, exclusive, relative to testcase; not same as `line + len(test_item.data)` due to collapsing |
| 452 | end_line: int |
| 453 | |
| 454 | @property |
| 455 | def trimmed_newlines(self) -> int: # compensates for strip_list |
| 456 | return self.end_line - self.line - len(self.data) |
| 457 | |
| 458 | |
| 459 | def parse_test_data(raw_data: str, name: str) -> list[TestItem]: |
no outgoing calls
no test coverage detected
searching dependent graphs…