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

Method statement

src/_pytest/_code/code.py:225–229  ·  view source on GitHub ↗

_pytest._code.Source object for the current statement.

(self)

Source from the content-addressed store, hash-verified

223
224 @property
225 def statement(self) -> "Source":
226 """_pytest._code.Source object for the current statement."""
227 source = self.frame.code.fullsource
228 assert source is not None
229 return source.getstatement(self.lineno)
230
231 @property
232 def path(self) -> Union[Path, str]:

Callers

nothing calls this directly

Calls 1

getstatementMethod · 0.80

Tested by

no test coverage detected