Skip to main content

review.runs.Failure

review.runs.Failure(kind, nodeid, crash)

One failing evaluation as the runner printed it.

Attributes

Name Type Description
kind str FAILED or ERROR.
nodeid str The pytest node id.
crash tuple[str, …] The crash lines, at most 10, without their indent.

Examples

from babregen.review.runs import failing_evaluations

text = "5 failed in <time>\nbabregen: failing evaluations\nFAILED t.py::a\n    t.py:3: assert 1 == 2\n"
print(failing_evaluations(text))
(Failure(kind='FAILED', nodeid='t.py::a', crash=('t.py:3: assert 1 == 2',)),)