MCPcopy
hub / github.com/pytest-dev/pytest / repr_failure

Method repr_failure

doc/en/example/nonpython/conftest.py:33–43  ·  doc/en/example/nonpython/conftest.py::YamlItem.repr_failure

Called when self.runtest() raises an exception.

(self, excinfo)

Source from the content-addressed store, hash-verified

31 raise YamlException(self, name, value)
32
33 def repr_failure(self, excinfo):
34 class="st">""class="st">"Called when self.runtest() raises an exception."class="st">""
35 if isinstance(excinfo.value, YamlException):
36 return class="st">"\n".join(
37 [
38 class="st">"usecase execution failed",
39 class="st">" spec failed: {1!r}: {2!r}".format(*excinfo.value.args),
40 class="st">" no further details known at this point.",
41 ]
42 )
43 return super().repr_failure(excinfo)
44
45 def reportinfo(self):
46 return self.path, 0, fclass="st">"usecase: {self.name}"

Callers

nothing calls this directly

Calls 2

joinMethod · 0.80
formatMethod · 0.45

Tested by

no test coverage detected