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

Method obj

src/_pytest/python.py:292–301  ·  view source on GitHub ↗

Underlying Python object.

(self)

Source from the content-addressed store, hash-verified

290
291 @property
292 def obj(self):
293 """Underlying Python object."""
294 obj = getattr(self, "_obj", None)
295 if obj is None:
296 self._obj = obj = self._getobj()
297 # XXX evil hack
298 # used to avoid Function marker duplication
299 if self._ALLOW_MARKERS:
300 self.own_markers.extend(get_unpacked_marks(self.obj))
301 return obj
302
303 @obj.setter
304 def obj(self, value):

Callers 2

newinstanceMethod · 0.80
setupMethod · 0.80

Calls 2

_getobjMethod · 0.95
get_unpacked_marksFunction · 0.90

Tested by 1

setupMethod · 0.64