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

Function traverse_node

src/_pytest/assertion/rewrite.py:544–548  ·  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

542
543
544def traverse_node(node: ast.AST) -> Iterator[ast.AST]:
545 """Recursively yield node and all its children in depth-first order."""
546 yield node
547 for child in ast.iter_child_nodes(node):
548 yield from traverse_node(child)
549
550
551@functools.lru_cache(maxsize=1)

Callers 1

visit_AssertMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected