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

Method function

src/_pytest/fixtures.py:495–501  ·  view source on GitHub ↗

Test function object if the request has a per-function scope.

(self)

Source from the content-addressed store, hash-verified

493
494 @property
495 def function(self):
496 """Test function object if the request has a per-function scope."""
497 if self.scope != "function":
498 raise AttributeError(
499 f"function not available in {self.scope}-scoped context"
500 )
501 return self._pyfuncitem.obj
502
503 @property
504 def cls(self):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected