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

Method listchain

src/_pytest/nodes.py:327–336  ·  view source on GitHub ↗

Return list of all parent collectors up to self, starting from the root of collection tree.

(self)

Source from the content-addressed store, hash-verified

325 pass
326
327 def listchain(self) -> List["Node"]:
328 """Return list of all parent collectors up to self, starting from
329 the root of collection tree."""
330 chain = []
331 item: Optional[Node] = self
332 while item is not None:
333 chain.append(item)
334 item = item.parent
335 chain.reverse()
336 return chain
337
338 def add_marker(
339 self, marker: Union[str, MarkDecorator], append: bool = True

Callers 11

listextrakeywordsMethod · 0.95
listnamesMethod · 0.95
_printcollecteditemsMethod · 0.80
setupMethod · 0.80
teardown_exactMethod · 0.80
getmodpathMethod · 0.80
from_itemMethod · 0.80
test_global_fileMethod · 0.80
test_pkgfileMethod · 0.80

Calls 1

appendMethod · 0.80

Tested by 3

test_global_fileMethod · 0.64
test_pkgfileMethod · 0.64