r"""Changes Windows paths to Linux paths in error messages. E.g. foo\bar.py -> foo/bar.py.
(line: str)
| 566 | |
| 567 | |
| 568 | def fix_win_path(line: str) -> str: |
| 569 | r"""Changes Windows paths to Linux paths in error messages. |
| 570 | |
| 571 | E.g. foo\bar.py -> foo/bar.py. |
| 572 | """ |
| 573 | line = line.replace(root_dir, root_dir.replace("\\", "/")) |
| 574 | m = re.match(r"^([\S/]+):(\d+:)?(\s+.*)", line) |
| 575 | if not m: |
| 576 | return line |
| 577 | else: |
| 578 | filename, lineno, message = m.groups() |
| 579 | return "{}:{}{}".format(filename.replace("\\", "/"), lineno or "", message) |
| 580 | |
| 581 | |
| 582 | def fix_cobertura_filename(line: str) -> str: |
no test coverage detected
searching dependent graphs…