(tr)
| 717 | f.write(f"{rep.duration:02.2f}s {rep.when:<8} {rep.nodeid}\n") |
| 718 | |
| 719 | def summary_failures_short(tr): |
| 720 | # expecting that the reports were --tb=long (default) so we chop them off here to the last frame |
| 721 | reports = tr.getreports("failed") |
| 722 | if not reports: |
| 723 | return |
| 724 | tr.write_sep("=", "FAILURES SHORT STACK") |
| 725 | for rep in reports: |
| 726 | msg = tr._getfailureheadline(rep) |
| 727 | tr.write_sep("_", msg, red=True, bold=True) |
| 728 | # chop off the optional leading extra frames, leaving only the last one |
| 729 | longrepr = re.sub(r".*_ _ _ (_ ){10,}_ _ ", "", rep.longreprtext, 0, re.M | re.S) |
| 730 | tr._tw.line(longrepr) |
| 731 | # note: not printing out any rep.sections to keep the report short |
| 732 | |
| 733 | # use ready-made report funcs, we are just hijacking the filehandle to log to a dedicated file each |
| 734 | # adapted from https://github.com/pytest-dev/pytest/blob/897f151e/src/_pytest/terminal.py#L814 |
no outgoing calls
no test coverage detected