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

Method helper

src/_pytest/assertion/rewrite.py:783–787  ·  view source on GitHub ↗

Call a helper in this module.

(self, name: str, *args: ast.expr)

Source from the content-addressed store, hash-verified

781 return self.helper("_saferepr", expr)
782
783 def helper(self, name: str, *args: ast.expr) -> ast.expr:
784 """Call a helper in this module."""
785 py_name = ast.Name("@pytest_ar", ast.Load())
786 attr = ast.Attribute(py_name, name, ast.Load())
787 return ast.Call(attr, list(args), [])
788
789 def builtin(self, name: str) -> ast.Attribute:
790 """Return the builtin called *name*."""

Callers 6

displayMethod · 0.95
visit_AssertMethod · 0.95
visit_NamedExprMethod · 0.95
visit_NameMethod · 0.95
visit_BoolOpMethod · 0.95
visit_CompareMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected