Merge pull request #7078 from andy-maier/andy/add-docs-repr_failure
Fixes #7077: Added & improved docs for repr_failure() in Node & Collector
This commit is contained in:
commit
798361ab9f
|
@ -364,6 +364,11 @@ class Node(metaclass=NodeMeta):
|
||||||
def repr_failure(
|
def repr_failure(
|
||||||
self, excinfo, style=None
|
self, excinfo, style=None
|
||||||
) -> Union[str, ReprExceptionInfo, ExceptionChainRepr, FixtureLookupErrorRepr]:
|
) -> Union[str, ReprExceptionInfo, ExceptionChainRepr, FixtureLookupErrorRepr]:
|
||||||
|
"""
|
||||||
|
Return a representation of a collection or test failure.
|
||||||
|
|
||||||
|
:param excinfo: Exception information for the failure.
|
||||||
|
"""
|
||||||
return self._repr_failure_py(excinfo, style)
|
return self._repr_failure_py(excinfo, style)
|
||||||
|
|
||||||
|
|
||||||
|
@ -403,7 +408,11 @@ class Collector(Node):
|
||||||
raise NotImplementedError("abstract")
|
raise NotImplementedError("abstract")
|
||||||
|
|
||||||
def repr_failure(self, excinfo):
|
def repr_failure(self, excinfo):
|
||||||
""" represent a collection failure. """
|
"""
|
||||||
|
Return a representation of a collection failure.
|
||||||
|
|
||||||
|
:param excinfo: Exception information for the failure.
|
||||||
|
"""
|
||||||
if excinfo.errisinstance(self.CollectError) and not self.config.getoption(
|
if excinfo.errisinstance(self.CollectError) and not self.config.getoption(
|
||||||
"fulltrace", False
|
"fulltrace", False
|
||||||
):
|
):
|
||||||
|
|
Loading…
Reference in New Issue