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

Method module

src/_pytest/fixtures.py:523–527  ·  view source on GitHub ↗

Python module object where the test function was collected.

(self)

Source from the content-addressed store, hash-verified

521
522 @property
523 def module(self):
524 """Python module object where the test function was collected."""
525 if self.scope not in ("function", "class", "module"):
526 raise AttributeError(f"module not available in {self.scope}-scoped context")
527 return self._pyfuncitem.getparent(_pytest.python.Module).obj
528
529 @property
530 def path(self) -> Path:

Callers

nothing calls this directly

Calls 1

getparentMethod · 0.80

Tested by

no test coverage detected