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

Method _getobj

src/_pytest/python.py:1702–1709  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1700 return getimfunc(self.obj)
1701
1702 def _getobj(self):
1703 assert self.parent is not None
1704 if isinstance(self.parent, Class):
1705 # Each Function gets a fresh class instance.
1706 parent_obj = self.parent.newinstance()
1707 else:
1708 parent_obj = self.parent.obj # type: ignore[attr-defined]
1709 return getattr(parent_obj, self.originalname)
1710
1711 @property
1712 def _pyfuncitem(self):

Callers

nothing calls this directly

Calls 1

newinstanceMethod · 0.80

Tested by

no test coverage detected