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

Function traverse_node

src/_pytest/assertion/rewrite.py:550–554  ·  view source on GitHub ↗

Recursively yield node and all its children in depth-first order.

(node: ast.AST)

Source from the content-addressed store, hash-verified

548
549
550def traverse_node(node: ast.AST) -> Iterator[ast.AST]:
551 """Recursively yield node and all its children in depth-first order."""
552 yield node
553 for child in ast.iter_child_nodes(node):
554 yield from traverse_node(child)
555
556
557@functools.lru_cache(maxsize=1)

Callers 1

visit_AssertMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected