MCPcopy Create free account
hub / github.com/pytest-dev/pytest / repr_failure

Method repr_failure

doc/en/example/nonpython/conftest.py:31–40  ·  view source on GitHub ↗

Called when self.runtest() raises an exception.

(self, excinfo)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

formatMethod · 0.45

Tested by

no test coverage detected